Closed rcubetrac closed 16 years ago
Comment by Claude Schmidhuber on 3 May 2007 18:45 UTC
I just encountered the same problem. However the solution is easy.
Just move the rcmail_email2user above the user-existing-query
------------------------------------------------------------------------------------
file: \program\include\main.inc
------------------------------------------------------------------------------------
about at line 470
------------------------------------------------------------------------------------
/* [virtuser-resolving only makes sense if done before checking if
the user already exists in roundcube db */
// try to resolve email address from virtuser table
if (!empty($CONFIG['virtuser_file'](cls])) && strstr($user, '@'))
$user = rcmail_email2user($user);
// query if user already registered
$sql_result = $DB->query("SELECT user_id, username, language, preferences
FROM ".get_table_name('users')."
WHERE mail_host=? AND (username=? OR alias=?)",
$host,
$user,
$user);
// user already registered -> overwrite username
if ($sql_arr = $DB->fetch_assoc($sql_result))
{
$user_id = $sql_arr[ $user = $sql_arr['username']('user_id'];
);
}
/* [cls] moved virtuser_file check prior to db query, to line 474*/
-----------------------------------------------------------------------------
regards, claude
Owner changed by Claude Schmidhuber on 3 May 2007 18:45 UTC
=> none
Comment by aphexer on 3 Oct 2007 21:15 UTC
I can confirm this bug still exists in 0.1-rc1. I applied the patch above and it fixed it. Thanks for the patch.
But please, when will this finally be fixed in subversion? I hope it's in rc2.
Comment by @thomascube on 12 Feb 2008 18:52 UTC
Should be fixed in current trunk. Please reopen if the problem persists.
Status changed by @thomascube on 12 Feb 2008 18:52 UTC
new => closed
Reported by crook on 4 Apr 2007 11:44 UTC as Trac ticket #1484325
Using the virtuser_file option roundcube detects the right username successfully. The problem is that roundcube creates every login a complete new user in the database when loggin on with an email. (So the user's preferences can't be used)
Loggin on with the username works properly and the system uses the existing user.
Migrated-From: http://trac.roundcube.net/ticket/1484325