X-Git-Url: http://git.polytechnique.org/?a=blobdiff_plain;f=include%2Fuser.func.inc.php;h=b903654a1bd08ba87ee43df4a29f731c5bab45ed;hb=a7d35093a40837b3a17d7fbac0259995f084812c;hp=8a53e7674b0ad2c58c18d4e2ec723f617bdff0c1;hpb=53ee429b076f679168fda0301651a21b00ddf0e3;p=platal.git diff --git a/include/user.func.inc.php b/include/user.func.inc.php index 8a53e76..b903654 100644 --- a/include/user.func.inc.php +++ b/include/user.func.inc.php @@ -74,8 +74,10 @@ function user_clear_all_subs($user_id, $really_del=true) // Deactivates, when available, the Google Apps account of the user. if ($globals->mailstorage->googleapps_domain) { require_once 'googleapps.inc.php'; - $account = new GoogleAppsAccount($uid, $alias); - $account->suspend(); + if (GoogleAppsAccount::account_status($uid)) { + $account = new GoogleAppsAccount($uid, $alias); + $account->suspend(); + } } } @@ -86,7 +88,7 @@ function user_clear_all_subs($user_id, $really_del=true) function _default_user_callback($login) { global $page; - $page->trig("Il n'y a pas d'utilisateur avec l'identifiant : $login"); + $page->trigError("Il n'y a pas d'utilisateur avec l'identifiant : $login"); return; } @@ -169,7 +171,7 @@ function get_user_login($data, $get_forlife = false, $callback = '_default_user_ default: if (S::has_perms()) { $aliases = $res->fetchColumn(); - $page->trig("Il y a $i utilisateurs avec cette adresse mail : ".join(', ', $aliases)); + $page->trigError("Il y a $i utilisateurs avec cette adresse mail : ".join(', ', $aliases)); } else { $res->free(); }