Closed (fixed)
Project:
Alternative login ID & display names
Version:
5.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
19 Dec 2006 at 08:21 UTC
Updated:
21 Jul 2007 at 06:47 UTC
I use the profile module. When I update a user data from another tab of the edit user page, the alt login is reset.
I use this version of alt_login : v 1.1.2.2 2006/11/19 20:41:03
It's because the alt login is deleted on line 109. I added a condition on the else statement. Here is the new function I came up with to fix that:
function _alt_login_update($uid, &$edit) {
$alt_login = $edit['alt_login'];
// Only keep a database entry if an alternate login has been specified.
if ($alt_login != "") {
if (db_result(db_query('SELECT uid FROM {alt_login} WHERE uid = %d', $uid))) {
db_query("UPDATE {alt_login} SET alt_login = '%s' WHERE uid = %d", $alt_login, $uid);
}
else {
db_query("INSERT INTO {alt_login} (uid, alt_login) VALUES (%d, '%s')", $uid, $alt_login);
}
}
elseif (isset($alt_login) && $alt_login == "") {
db_query('DELETE FROM {alt_login} WHERE uid = %d', $uid);
}
// Don't want this saved in the data column of the users table, so unset.
unset($edit['alt_login']);
}
Comments
Comment #1
hunmonk commentedthere's a lot simpler way to do this :) see http://drupal.org/cvs?commit=48525 for details on the fix.
fixed in 4.7, 5, and HEAD. if there are still problems, please reopen the issue.
Comment #2
(not verified) commentedComment #3
AstaC commentedI have the same problem in 5.1 right now. Created personal information via Profile and when they update their personal information alternate login is deleted.
Comment #4
hunmonk commentedalso, are you using the latest release of the module?
if not, then please upgrade. if so, then please provide exact steps to duplicate the problem. i cannot fix it if i cannot see it :)
Comment #5
hunmonk commentedi've made some more adjustments which should now completely prevent this issue from occuring. please download the latest release to resolve the issue. if the issue persists, please re-open this issue with a detailed steps on how to reproduce the issue.
please note that you should always perform tests with no other contributed modules enabled. if it's bug-free, then begin adding the other contribs back in. if the bug reappears, try to note which module is causing the conflict.
Comment #6
(not verified) commented