X-Git-Url: http://git.polytechnique.org/?a=blobdiff_plain;f=classes%2Fuser.php;h=7ede56b26bae7450622e032b3213cc4623763860;hb=49056fe2c32629b7b63b7936e6d9a25562fe5b5a;hp=ab554bc4174ec5fb630869a139e7aaa92c5d164e;hpb=c4f03937349bddfad25990239a825f8161615260;p=platal.git diff --git a/classes/user.php b/classes/user.php index ab554bc..7ede56b 100644 --- a/classes/user.php +++ b/classes/user.php @@ -292,6 +292,14 @@ class User extends PlUser return $this->profile()->fullName($with_promo); } + public function shortName($with_promo = false) + { + if (!$this->hasProfile()) { + return $this->full_name; + } + return $this->profile()->shortName($with_promo); + } + public function directoryName() { if (!$this->hasProfile()) { @@ -769,7 +777,7 @@ class User extends PlUser $this->forlifeEmail(), $newuser->id()); // Reftech new user so its forlifeEmail will be correct. - $newuser = getSilentWithUID($newuser->id()); + $newuser = self::getSilentWithUID($newuser->id()); } // Change email used in mailing lists.