X-Git-Url: http://git.polytechnique.org/?a=blobdiff_plain;f=include%2Fgoogleapps.inc.php;h=5cf6eb6158d9c8ea5e416aadb68f5e0fe7360f9d;hb=28c20b86be8b40cecba0d83080879f81c49e07ad;hp=f5513803b99bb8fe55403297732fd14fd1b4b9b8;hpb=93d42b4fcc6f055a428c9b63e386ac62c918d08a;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.