]> BookStack Code Mirror - bookstack/blobdiff - app/Users/Models/User.php
Locales: More use of locale objects, Addressed failing tests
[bookstack] / app / Users / Models / User.php
index 78411e0d4cb31bb0dc083dc265af79ca47c5050c..39236c7e41b173c28bc170875716d0cb62d51816 100644 (file)
@@ -12,6 +12,7 @@ use BookStack\Api\ApiToken;
 use BookStack\App\Model;
 use BookStack\App\Sluggable;
 use BookStack\Entities\Tools\SlugGenerator;
+use BookStack\Translation\LocaleDefinition;
 use BookStack\Translation\LocaleManager;
 use BookStack\Uploads\Image;
 use Carbon\Carbon;
@@ -342,11 +343,11 @@ class User extends Model implements AuthenticatableContract, CanResetPasswordCon
     }
 
     /**
-     * Get the system language for this user.
+     * Get the locale for this user.
      */
-    public function getLanguage(): string
+    public function getLocale(): LocaleDefinition
     {
-        return app()->make(LocaleManager::class)->getForUser($this)->appLocale();
+        return app()->make(LocaleManager::class)->getForUser($this);
     }
 
     /**