X-Git-Url: http://git.polytechnique.org/?a=blobdiff_plain;f=modules%2Fgoogleapps.php;h=e75ce5c6560367b889b6fe849e63a3e84bd55ec8;hb=6c7f47f7a642c7abad6cbea5e1f740aade8d8f48;hp=7648c8743cbb3a76e5755c29aba493b16c447bf6;hpb=eb5a266d6a3e98800b2542b1fe4786cb73788797;p=platal.git diff --git a/modules/googleapps.php b/modules/googleapps.php index 7648c87..e75ce5c 100644 --- a/modules/googleapps.php +++ b/modules/googleapps.php @@ -1,6 +1,6 @@ fetchOneAssoc(); $sql_job['decoded_parameters'] = var_export(json_decode($sql_job['j_parameters'], true), true); @@ -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);