X-Git-Url: http://git.polytechnique.org/?a=blobdiff_plain;f=include%2Fgoogleapps.inc.php;h=f4cc69c5e4262dcee7c309ffa0b8e00b566afec6;hb=2f854773c646a58688a06c24c6dcf19479c91837;hp=f5513803b99bb8fe55403297732fd14fd1b4b9b8;hpb=00ca0ad5370df5be4a0272364fb16a4385ffabfe;p=platal.git diff --git a/include/googleapps.inc.php b/include/googleapps.inc.php index f551380..f4cc69c 100644 --- a/include/googleapps.inc.php +++ b/include/googleapps.inc.php @@ -1,6 +1,6 @@ pending_validation_unsuspend = Validate::get_typed_requests_count($this->user->id(), 'gapps-unsuspend'); } @@ -341,7 +340,6 @@ class GoogleAppsAccount } if (!$this->pending_update_suspension && !$this->pending_validation_unsuspend) { - require_once('validations.inc.php'); $unsuspend = new GoogleAppsUnsuspendReq($this->user); $unsuspend->submit(); $this->pending_validation_unsuspend = true; @@ -376,13 +374,12 @@ class GoogleAppsAccount if (!$this->pending_create) { // Retrieves information on the new account. - // TODO: retreive first_name and last_name from the profile. - if (!$user->hasProfile()) { - $prenom = $user->displayName(); - $nom = $user->fullName(); + if (!$this->user->hasProfile()) { + $prenom = $this->user->displayName(); + $nom = $this->user->fullName(); } else { - $prenom = $user->profile()->firstName(); - $nom = $user->profile()->lastName(); + $prenom = $this->user->profile()->firstName(); + $nom = $this->user->profile()->lastName(); } // Adds an 'unprovisioned' entry in the gapps_accounts table.