if ($subaction == 'sync') {
$account->set_password_sync(true);
$account->set_password(S::v('password'));
- $page->trig("Ton mot de passe Google Apps sera dorénavant synchronisé avec ton mot de passe Polytechnique.org.");
+ pl_redirect('googleapps#password');
} else if ($subaction == 'nosync') {
$account->set_password_sync(false);
} else if (Post::has('response2') && !$account->sync_password) {
+ S::assert_xsrf_token();
$account->set_password(Post::v('response2'));
}
}
if ($action == 'suspend' && Post::has('suspend') && $account->active()) {
+ S::assert_xsrf_token();
+
if ($account->pending_update_suspension) {
$page->trig("Ton compte est déjà en cours de désactivation.");
} else {
$page->assign('password_sync', Get::b('password_sync', true));
}
if ($action == 'create' && Post::has('password_sync') && Post::has('redirect_mails')) {
+ S::assert_xsrf_token();
+
$password_sync = Post::b('password_sync');
$redirect_mails = Post::b('redirect_mails');
if ($password_sync) {