mirror of
https://github.com/snipe/snipe-it.git
synced 2024-11-12 16:44:08 -08:00
Removed getCompleteNameAttribute(), modified getFullNameAttribute()
Signed-off-by: snipe <snipe@snipe.net>
This commit is contained in:
parent
f3460b5a4f
commit
354550b52e
|
@ -247,21 +247,12 @@ class User extends SnipeModel implements AuthenticatableContract, AuthorizableCo
|
||||||
*/
|
*/
|
||||||
public function getFullNameAttribute()
|
public function getFullNameAttribute()
|
||||||
{
|
{
|
||||||
return $this->first_name.' '.$this->last_name;
|
$setting = Setting::getSettings();
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
if ($setting->name_display_format=='last_first') {
|
||||||
* Returns the complete name attribute with username
|
return ($this->last_name) ? $this->last_name.' '.$this->first_name : $this->first_name;
|
||||||
*
|
}
|
||||||
* @todo refactor this so it's less repetitive and dumb
|
return $this->last_name ? $this->first_name.' '.$this->last_name : $this->first_name;
|
||||||
*
|
|
||||||
* @author A. Gianotto <snipe@snipe.net>
|
|
||||||
* @since [v2.0]
|
|
||||||
* @return string
|
|
||||||
*/
|
|
||||||
public function getCompleteNameAttribute()
|
|
||||||
{
|
|
||||||
return $this->last_name.', '.$this->first_name.' ('.$this->username.')';
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue