Remove nickname
This commit is contained in:
@@ -29,7 +29,6 @@ class User extends Authenticatable
|
||||
'is_banned',
|
||||
// Discord
|
||||
'discord_id',
|
||||
'discord_name',
|
||||
'discord_avatar',
|
||||
];
|
||||
|
||||
@@ -60,26 +59,9 @@ class User extends Authenticatable
|
||||
'tag_blacklist' => 'array',
|
||||
// Discord
|
||||
'discord_id' => 'integer',
|
||||
'discord_name' => 'string',
|
||||
'discord_avatar' => 'string',
|
||||
];
|
||||
|
||||
/**
|
||||
* Get the user name
|
||||
*/
|
||||
public function getUserName(): string
|
||||
{
|
||||
if (!$this->discord_name) {
|
||||
return $this->name;
|
||||
}
|
||||
|
||||
if ($this->discord_name == $this->name)
|
||||
{
|
||||
return $this->name;
|
||||
}
|
||||
|
||||
return "{$this->name} ({$this->discord_name})";
|
||||
}
|
||||
|
||||
/**
|
||||
* Has Many Playlists.
|
||||
|
||||
Reference in New Issue
Block a user