Changeset 026d680 in github


Ignore:
Timestamp:
Apr 4, 2006 5:45:45 PM (7 years ago)
Author:
thomascube <thomas@…>
Branches:
master, HEAD, courier-fix, dev-browser-capabilities, pdo, release-0.6, release-0.7, release-0.8
Children:
f3704e1
Parents:
03f8558
Message:

Add configured domain to user names for login; changed get_input_value()

File:
1 edited

Legend:

Unmodified
Added
Removed
  • program/include/main.inc

    r4647e1b r026d680  
    388388    $imap_port = $CONFIG['default_port']; 
    389389 
     390 
     391  /* Modify username with domain if required   
     392     Inspired by Marco <P0L0_notspam_binware.org> 
     393  */ 
     394  // Check if we need to add domain 
     395  if ($CONFIG['username_domain'] && !strstr($user, '@')) 
     396    { 
     397    if (is_array($CONFIG['username_domain']) && isset($CONFIG['username_domain'][$host])) 
     398      $user .= '@'.$CONFIG['username_domain'][$host]; 
     399    else if (!empty($CONFIG['username_domain'])) 
     400      $user .= '@'.$CONFIG['username_domain'];     
     401    } 
     402 
     403 
    390404  // query if user already registered 
    391405  $sql_result = $DB->query("SELECT user_id, username, language, preferences 
     
    929943  else if ($source==RCUBE_INPUT_GPC) 
    930944    { 
    931     if (isset($_GET[$fname])) 
     945    if (isset($_POST[$fname])) 
     946      $value = $_POST[$fname]; 
     947    else if (isset($_GET[$fname])) 
    932948      $value = $_GET[$fname]; 
    933     else if (isset($_POST[$fname])) 
    934       $value = $_POST[$fname]; 
    935949    else if (isset($_COOKIE[$fname])) 
    936950      $value = $_COOKIE[$fname]; 
     
    946960   
    947961  // convert to internal charset 
    948   return rcube_charset_convert($value, $OUTPUT->get_charset(), $charset); 
     962  if (is_object($OUTPUT)) 
     963    return rcube_charset_convert($value, $OUTPUT->get_charset(), $charset); 
     964  else 
     965    return $value; 
    949966  } 
    950967 
     
    11311148        return rep_specialchars_output($name, 'html', 'all'); 
    11321149        } 
     1150      else if ($object=='version') 
     1151        { 
     1152        return (string)RCMAIL_VERSION; 
     1153        } 
    11331154      else if ($object=='pagetitle') 
    11341155        { 
Note: See TracChangeset for help on using the changeset viewer.