Merge commit 'origin/master' into hruid
[platal.git] / modules / admin.php
index de86bfc..e03b318 100644 (file)
@@ -601,7 +601,7 @@ class AdminModule extends PLModule
                         // and the password was changed, updates the Google Apps password as well.
                         if ($globals->mailstorage->googleapps_domain && Env::v('newpass_clair') != "********") {
                             require_once 'googleapps.inc.php';
-                            $account = new GoogleAppsAccount($mr['user_id'], $mr['forlife']);
+                            $account = new GoogleAppsAccount(User::get($mr['forlife']));
                             if ($account->active() && $account->sync_password) {
                                 $account->set_password($pass_encrypted);
                             }
@@ -612,7 +612,7 @@ class AdminModule extends PLModule
                             $new_fields['perms'] == 'disabled' &&
                             $new_fields['perms'] != $old_fields['perms']) {
                             require_once 'googleapps.inc.php';
-                            $account = new GoogleAppsAccount($mr['user_id'], $mr['forlife']);
+                            $account = new GoogleAppsAccount(User::get($mr['forlife']));
                             $account->suspend();
                         }
                         break;