add user ban log from cleanup.php

This commit is contained in:
xiaomlove
2021-05-13 21:31:09 +08:00
parent 174fd2f180
commit 8963058463
20 changed files with 250 additions and 42 deletions

View File

@@ -124,6 +124,15 @@ class User extends Authenticatable
return Locale::$languageMaps[$this->language->site_lang_folder] ?? 'en';
}
public function getSiteLangFolderAttribute()
{
$result = optional($this->language)->site_lang_folder;
if ($result && in_array($result, ['en', 'chs', 'cht'])) {
return $result;
}
return 'en';
}
public function exams()
{