Adding (per Proposal N on #590): need to get latest admin menu 3.x branch.
And these are the changes in functions I patched in LoginToboggan? -- need to make a patch in our repo and submit '@' part back to the project:
---- [Removed LOWER() in the queries ] ----
function logintoboggan_user($op, &$edit, &$user_edit, $category = NULL) {
[[snip]]
if (isset($edit['name']) && db_result(db_query("SELECT uid FROM {users} WHERE mail = '%s' AND uid <> %d", $edit['name'], $uid))) {
form_set_error('name', t('This name has already been taken by another user.'));
}
// Check that no user is using this email address for their name.
if (isset($edit['mail']) && db_result(db_query("SELECT uid FROM {users} WHERE name = '%s' AND uid <> %d", $edit['mail'], $uid))) {
form_set_error('mail', t('This e-mail has already been taken by another user.'));
[[snip]]
}
---- [ added '@' check and removed LOWER() in query] ----
function logintoboggan_user_login_validate($form, &$form_state) {
if (isset($form_state['values']['name']) && $form_state['values']['name'] &&
strpos($form_state['values']['name'], '@') > 0) {
if ($name = db_result(db_query("SELECT name FROM {users} WHERE mail = '%s'", $form_state['values']['name']))) {
form_set_value($form['name'], $name, $form_state);
}
}
}