From 65bd8825131c37cd0c7f137537788e5911ebc62f Mon Sep 17 00:00:00 2001 From: Robert Sesek Date: Mon, 5 Mar 2007 04:43:48 +0000 Subject: [PATCH] r1428: In Authentication::_syncBugdarUser(), only run UserAPI->update() if fields have actually changed --- includes/auth/auth.php | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/includes/auth/auth.php b/includes/auth/auth.php index 5484da0..14c3539 100644 --- a/includes/auth/auth.php +++ b/includes/auth/auth.php @@ -284,13 +284,23 @@ class Authentication unset($fields['authid']); unset($fields['password']); + $change = false; + $user = new UserAPI($this->registry); $user->set('userid', $this->authUser[ $this->fieldMap['authid'] ]); + $user->set_condition(); foreach ($fields AS $bugdar => $authdb) { - $user->set($bugdar, $this->authUser["$authdb"]); + if ($this->bugdarUser["$bugdar"] != $this->authUser["$authDb"]) + { + $user->set($bugdar, $this->authUser["$authdb"]); + $change = true; + } + } + if ($change) + { + $user->update(); } - $user->update(); } // ################################################################### -- 2.43.5