From 6c2a4a5ff78d9098b840146e108ecf7393102a57 Mon Sep 17 00:00:00 2001 From: Franz Liedke Date: Thu, 22 Nov 2018 21:12:25 +0100 Subject: [PATCH] Remove obsolete property accessor in User model The locale field does not exist, and the accessor code was broken. Closes #1653. --- src/User/User.php | 14 -------------- 1 file changed, 14 deletions(-) diff --git a/src/User/User.php b/src/User/User.php index 8bf1ef1b2..13d55dd1a 100644 --- a/src/User/User.php +++ b/src/User/User.php @@ -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. *