@@ 64-73 (lines=10) @@ | ||
61 | * |
|
62 | * @return mixed |
|
63 | */ |
|
64 | public function isSuperUser() |
|
65 | { |
|
66 | if (config('nukacode-user.allow_super_user') == true |
|
67 | && $this->super_flag == 1 |
|
68 | ) { |
|
69 | return true; |
|
70 | } |
|
71 | ||
72 | return false; |
|
73 | } |
|
74 | ||
75 | /** |
|
76 | * Grant a user global rights. |
|
@@ 80-90 (lines=11) @@ | ||
77 | * |
|
78 | * @return mixed |
|
79 | */ |
|
80 | public function makeSuperUser() |
|
81 | { |
|
82 | if (config('nukacode-user.allow_super_user') == true) { |
|
83 | $this->super_flag = 1; |
|
84 | $this->save(); |
|
85 | ||
86 | return true; |
|
87 | } |
|
88 | ||
89 | return false; |
|
90 | } |
|
91 | ||
92 | /** |
|
93 | * Order by name ascending scope |