Reenables updates of the GoogleApps password from the admin pages.
authorVincent Zanotti <vincent.zanotti@m4x.org>
Sat, 17 Jul 2010 16:54:48 +0000 (18:54 +0200)
committerVincent Zanotti <vincent.zanotti@m4x.org>
Sat, 17 Jul 2010 16:55:31 +0000 (18:55 +0200)
Signed-off-by: Vincent Zanotti <vincent.zanotti@m4x.org>
modules/admin.php

index 3c0cb27..5970e89 100644 (file)
@@ -426,11 +426,10 @@ class AdminModule extends PLModule
             }
             if (!Post::blank('hashpass')) {
                 $to_update['password'] = Post::s('hashpass');
-                // TODO: Propagate the password update to GoogleApps, when required. Eg:
-                // $account = new GoogleAppsAccount($user);
-                // if ($account->active() && $account->sync_password) {
-                //     $account->set_password($pass_encrypted);
-                // }
+                $account = new GoogleAppsAccount($user);
+                if ($account->active() && $account->sync_password) {
+                    $account->set_password(Post::s('hashpass'));
+                }
             }
             if (!Post::blank('weak_password')) {
                 $to_update['weak_password'] = Post::s('weak_password');