mirror of
https://github.com/flarum/framework.git
synced 2025-02-02 08:53:59 +08:00
Remove obsolete property accessor in User model
The locale field does not exist, and the accessor code was broken. Closes #1653.
This commit is contained in:
parent
2d31a6f72e
commit
6c2a4a5ff7
|
@ -18,7 +18,6 @@ use Flarum\Database\ScopeVisibilityTrait;
|
|||
use Flarum\Event\ConfigureUserPreferences;
|
||||
use Flarum\Event\GetDisplayName;
|
||||
use Flarum\Event\PrepareUserGroups;
|
||||
use Flarum\Foundation\Application;
|
||||
use Flarum\Foundation\EventGeneratorTrait;
|
||||
use Flarum\Group\Group;
|
||||
use Flarum\Group\Permission;
|
||||
|
@ -43,7 +42,6 @@ use Illuminate\Contracts\Session\Session;
|
|||
* @property string $email
|
||||
* @property bool $is_email_confirmed
|
||||
* @property string $password
|
||||
* @property string $locale
|
||||
* @property string|null $avatar_url
|
||||
* @property array $preferences
|
||||
* @property \Carbon\Carbon|null $joined_at
|
||||
|
@ -312,18 +310,6 @@ class User extends AbstractModel
|
|||
return static::$dispatcher->until(new GetDisplayName($this)) ?: $this->username;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the user's locale, falling back to the forum's default if they
|
||||
* haven't set one.
|
||||
*
|
||||
* @param string $value
|
||||
* @return string
|
||||
*/
|
||||
public function getLocaleAttribute($value)
|
||||
{
|
||||
return $value ?: Application::config('locale', 'en');
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if a given password matches the user's password.
|
||||
*
|
||||
|
|
Loading…
Reference in New Issue
Block a user