Commit 146a5deb authored by Chris Herberte's avatar Chris Herberte

bug fix #377262 by heydemo: Log user in after registration

parent e09959d9
......@@ -34,6 +34,12 @@ function email_registration_user($op, &$edit, &$account, $category = NULL) {
// replace with generated username
db_query("UPDATE {users} SET name = '%s' WHERE uid = '%s'", $namenew, $account->uid);
// if email verification is off and a new user is the one creating account, log the new user in with correct name
global $user;
if (!variable_get('user_email_verification', 1) && $user->uid == 0) {
$user = $account;
$user->name = $namenew;
$account->name = $namenew;
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment