diff options
author | ghendricks%novell.com <> | 2007-05-24 01:05:48 +0200 |
---|---|---|
committer | ghendricks%novell.com <> | 2007-05-24 01:05:48 +0200 |
commit | b712a735951ded7ea63804df48f3235d1786b49e (patch) | |
tree | 7585e1e6adeac991b45e8997aa9c9584adddfc9f | |
parent | 550e990b5f6daa20d39faa911e989b7fc198d269 (diff) | |
download | bugzilla-b712a735951ded7ea63804df48f3235d1786b49e.tar.gz bugzilla-b712a735951ded7ea63804df48f3235d1786b49e.tar.xz |
Bug 380928 â Bugzilla::Auth::Verify::create_or_update_user can return stale Bugzilla::User object
patch by vrb@novell.com r=mkanat a=mkanat
-rw-r--r-- | .project | 17 | ||||
-rw-r--r-- | Bugzilla/Auth/Verify.pm | 7 |
2 files changed, 20 insertions, 4 deletions
diff --git a/.project b/.project new file mode 100644 index 000000000..57f163c01 --- /dev/null +++ b/.project @@ -0,0 +1,17 @@ +<?xml version="1.0" encoding="UTF-8"?> +<projectDescription> + <name>bmo-tip</name> + <comment></comment> + <projects> + </projects> + <buildSpec> + <buildCommand> + <name>org.epic.perleditor.perlbuilder</name> + <arguments> + </arguments> + </buildCommand> + </buildSpec> + <natures> + <nature>org.epic.perleditor.perlnature</nature> + </natures> +</projectDescription> diff --git a/Bugzilla/Auth/Verify.pm b/Bugzilla/Auth/Verify.pm index deb5f4e95..b293e2583 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 }; } |