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 2d31a6f72e
commit 6c2a4a5ff7
No known key found for this signature in database
GPG Key ID: 9A0231A879B055F4

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