mirror of
https://github.com/NNTmux/newznab-tmux.git
synced 2026-08-31 10:18:55 +00:00
Add patch to rename user_roles_id to roles_id, update related classes
This commit is contained in:
@@ -62,7 +62,7 @@ class RegisterController extends Controller
|
||||
'email' => $data['email'],
|
||||
'password' => User::hashPassword($data['password']),
|
||||
'host' => $data['host'] ?? '',
|
||||
'user_roles_id' => $data['user_roles_id'],
|
||||
'roles_id' => $data['roles_id'],
|
||||
'notes' => $data['notes'],
|
||||
'invites' => $data['defaultinvites'],
|
||||
'api_token' => md5(Password::getRepository()->createNewToken()),
|
||||
@@ -135,7 +135,7 @@ class RegisterController extends Controller
|
||||
'password' => $password,
|
||||
'email' => $email,
|
||||
'host' => $request->ip(),
|
||||
'user_roles_id' => $userDefault !== null ? $userDefault['id'] : User::ROLE_USER,
|
||||
'roles_id' => $userDefault !== null ? $userDefault['id'] : User::ROLE_USER,
|
||||
'notes' => '',
|
||||
'defaultinvites' => $userDefault !== null ? $userDefault['defaultinvites'] : Invitation::DEFAULT_INVITES,
|
||||
]
|
||||
|
||||
@@ -225,7 +225,7 @@ class BasePageController extends Controller
|
||||
protected function setUserPreferences(): void
|
||||
{
|
||||
$this->userdata['categoryexclusions'] = User::getCategoryExclusion(Auth::id());
|
||||
$this->userdata['rolecategoryexclusions'] = RoleExcludedCategory::getRoleCategoryExclusion($this->userdata['user_roles_id']);
|
||||
$this->userdata['rolecategoryexclusions'] = RoleExcludedCategory::getRoleCategoryExclusion($this->userdata['roles_id']);
|
||||
|
||||
// Change the theme to user's selected theme if they selected one, else use the admin one.
|
||||
if ((int) Settings::settingValue('site.main.userselstyle') === 1) {
|
||||
@@ -256,7 +256,7 @@ class BasePageController extends Controller
|
||||
if ($sab->integratedBool !== false && $sab->url !== '' && $sab->apikey !== '') {
|
||||
$this->smarty->assign('sabapikeytype', $sab->apikeytype);
|
||||
}
|
||||
switch ((int) $this->userdata['user_roles_id']) {
|
||||
switch ((int) $this->userdata['roles_id']) {
|
||||
case User::ROLE_ADMIN:
|
||||
$this->smarty->assign('isadmin', 'true');
|
||||
break;
|
||||
@@ -272,7 +272,7 @@ class BasePageController extends Controller
|
||||
|
||||
$role = User::ROLE_USER;
|
||||
if (! empty($this->userdata)) {
|
||||
$role = $this->userdata['user_roles_id'];
|
||||
$role = $this->userdata['roles_id'];
|
||||
}
|
||||
|
||||
$content = new Contents();
|
||||
|
||||
@@ -179,7 +179,7 @@ class ProfileController extends BasePageController
|
||||
$data['username'],
|
||||
$request->input('email'),
|
||||
$data['grabs'],
|
||||
$data['user_roles_id'],
|
||||
$data['roles_id'],
|
||||
$data['notes'],
|
||||
$data['invites'],
|
||||
$request->has('movieview') ? 1 : 0,
|
||||
|
||||
Reference in New Issue
Block a user