thomascube
2009-04-19 cc97ea0559af1a92a54dbcdf738ee4d95e67d3ff
program/include/rcube_user.php
@@ -346,12 +346,18 @@
   */
  static function create($user, $host)
  {
    $user_name  = '';
    $user_email = '';
    $rcmail = rcmail::get_instance();
    $data = $rcmail->plugins->exec_hook('create_user', array('user'=>$user, 'user_name'=>$user_name, 'user_email'=>$user_email));
    $user_name = $data['user_name'];
    $user_email = $data['user_email'];
    $dbh = $rcmail->get_dbh();
    // try to resolve user in virtuser table and file
    if (!strpos($user, '@')) {
    if ($user_email != '' && !strpos($user, '@')) {
      if ($email_list = self::user2email($user, false))
        $user_email = $email_list[0];
    }
@@ -372,7 +378,9 @@
      if ($user_email=='')
        $user_email = strpos($user, '@') ? $user : sprintf('%s@%s', $user, $mail_domain);
      if ($user_name == '') {
      $user_name = $user != $user_email ? $user : '';
      }
      if (empty($email_list))
        $email_list[] = strip_newlines($user_email);