X-Git-Url: http://git.polytechnique.org/?a=blobdiff_plain;f=modules%2Fgoogleapps.php;h=f7796e2d6c45ae6b5021bf9e9c863199eb575085;hb=89274a92006f2e3d3124667cd77525f7d01f8012;hp=7b6360474c58d19fd5898754a870512613509487;hpb=bf88be24007cb338b2d1be518e8ba65c929a010a;p=platal.git diff --git a/modules/googleapps.php b/modules/googleapps.php index 7b63604..f7796e2 100644 --- a/modules/googleapps.php +++ b/modules/googleapps.php @@ -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);