Fixes call to user object in gapps.
authorStéphane Jacob <sj@m4x.org>
Mon, 5 Jul 2010 12:47:55 +0000 (14:47 +0200)
committerStéphane Jacob <sj@m4x.org>
Mon, 5 Jul 2010 12:47:55 +0000 (14:47 +0200)
Signed-off-by: Stéphane Jacob <sj@m4x.org>
include/googleapps.inc.php

index f551380..5cf6eb6 100644 (file)
@@ -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.