]> git.ipfire.org Git - thirdparty/bugzilla.git/commitdiff
Bug 380928 รข\80\93 Bugzilla::Auth::Verify::create_or_update_user can return stale Bugzill...
authorghendricks%novell.com <>
Wed, 23 May 2007 23:05:48 +0000 (23:05 +0000)
committerghendricks%novell.com <>
Wed, 23 May 2007 23:05:48 +0000 (23:05 +0000)
patch by vrb@novell.com r=mkanat a=mkanat

.project [new file with mode: 0644]
Bugzilla/Auth/Verify.pm

diff --git a/.project b/.project
new file mode 100644 (file)
index 0000000..57f163c
--- /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>
index deb5f4e951c6db3ea0134995ee99c49ba7924b0c..b293e2583dfc3ecb6aa114f512e3150229d34f0c 100644 (file)
@@ -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 };
 }