Merge remote branch 'origin/platal-1.0.0'
authorStéphane Jacob <sj@m4x.org>
Sat, 17 Jul 2010 17:01:00 +0000 (19:01 +0200)
committerStéphane Jacob <sj@m4x.org>
Sat, 17 Jul 2010 17:01:00 +0000 (19:01 +0200)
modules/admin.php

index 4d58460..9b5a925 100644 (file)
@@ -435,11 +435,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');