From: ghendricks%novell.com <> Date: Wed, 23 May 2007 23:05:48 +0000 (+0000) Subject: Bug 380928 – Bugzilla::Auth::Verify::create_or_update_user can return stale Bugzill... X-Git-Tag: bugzilla-3.1.2~208 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b712a735951ded7ea63804df48f3235d1786b49e;p=thirdparty%2Fbugzilla.git Bug 380928 – Bugzilla::Auth::Verify::create_or_update_user can return stale Bugzilla::User object patch by vrb@novell.com r=mkanat a=mkanat --- diff --git a/.project b/.project new file mode 100644 index 0000000000..57f163c015 --- /dev/null +++ b/.project @@ -0,0 +1,17 @@ + + + bmo-tip + + + + + + org.epic.perleditor.perlbuilder + + + + + + org.epic.perleditor.perlnature + + diff --git a/Bugzilla/Auth/Verify.pm b/Bugzilla/Auth/Verify.pm index deb5f4e951..b293e2583d 100644 --- a/Bugzilla/Auth/Verify.pm +++ b/Bugzilla/Auth/Verify.pm @@ -116,16 +116,15 @@ sub create_or_update_user { validate_email_syntax($username) || return { failure => AUTH_ERROR, error => 'auth_invalid_email', details => {addr => $username} }; - $dbh->do('UPDATE profiles SET login_name = ? WHERE userid = ?', - undef, $username, $user->id); + $user->set_login($username); } if ($real_name && $user->name ne $real_name) { # $real_name is more than likely tainted, but we only use it # in a placeholder and we never use it after this. trick_taint($real_name); - $dbh->do('UPDATE profiles SET realname = ? WHERE userid = ?', - undef, $real_name, $user->id); + $user->set_name($real_name); } + $user->update(); return { user => $user }; }