X-Git-Url: http://git.polytechnique.org/?a=blobdiff_plain;f=include%2Fgoogleapps.inc.php;h=5cf6eb6158d9c8ea5e416aadb68f5e0fe7360f9d;hb=bf52ec4e8de2e1c22020f7fffbf543ab4ee7f41a;hp=f5513803b99bb8fe55403297732fd14fd1b4b9b8;hpb=34465ab035104f739a54ec62660f04f874448627;p=platal.git diff --git a/include/googleapps.inc.php b/include/googleapps.inc.php index f551380..5cf6eb6 100644 --- a/include/googleapps.inc.php +++ b/include/googleapps.inc.php @@ -376,13 +376,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.