X-Git-Url: http://git.polytechnique.org/?a=blobdiff_plain;f=modules%2Fgoogleapps.php;h=246396626c9bea97ecb65e76c63b226da85e35fc;hb=06f4daf9ceb56712582d81330896848a1a262894;hp=7b6360474c58d19fd5898754a870512613509487;hpb=8230e9f8eff954fb1103c8bdcf0d22557d419ae7;p=platal.git diff --git a/modules/googleapps.php b/modules/googleapps.php index 7b63604..2463966 100644 --- a/modules/googleapps.php +++ b/modules/googleapps.php @@ -1,6 +1,6 @@ $this->make_hook('index', AUTH_MDP), - 'admin/googleapps' => $this->make_hook('admin', AUTH_MDP. 'admin'), - 'admin/googleapps/job' => $this->make_hook('admin_job', AUTH_MDP, 'admin'), + 'googleapps' => $this->make_hook('index', AUTH_MDP), + 'admin/googleapps' => $this->make_hook('admin', AUTH_MDP, 'admin'), + 'admin/googleapps/job' => $this->make_hook('admin_job', AUTH_MDP, 'admin'), 'admin/googleapps/user' => $this->make_hook('admin_user', AUTH_MDP, 'admin'), ); } @@ -206,12 +206,10 @@ class GoogleAppsModule extends PLModule $account->do_unsuspend(); $page->trigSuccess('Le compte est en cours de réactivation.'); } else if (Post::has('forcesync') && $account->active() && $account->sync_password) { - $res = XDB::query("SELECT password FROM auth_user_md5 WHERE user_id = {?}", $user->id()); - $account->set_password($res->fetchOneCell()); + $account->set_password($user->password()); $page->trigSuccess('Le mot de passe est en cours de synchronisation.'); } else if (Post::has('sync') && $account->active()) { - $res = XDB::query("SELECT password FROM auth_user_md5 WHERE user_id = {?}", $user->id()); - $account->set_password($res->fetchOneCell()); + $account->set_password($user->password()); $account->set_password_sync(true); } else if (Post::has('nosync') && $account->active()) { $account->set_password_sync(false);