1
0
mirror of https://github.com/flarum/core.git synced 2025-07-30 21:20:24 +02: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:
Franz Liedke
2018-11-22 21:12:25 +01:00
parent b68767abdd
commit 9b7957815f

View File

@@ -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.
*