-
Notifications
You must be signed in to change notification settings - Fork 0
user
Peter edited this page Mar 19, 2024
·
2 revisions
_G.user
Signature | Return | Description |
---|---|---|
sudo(psw) |
boolean |
Set user as super user |
isSu() |
boolean |
Check if the current user is the super user |
setSuPass(cPass, nPass) |
boolean |
Set the super user password |
hasPerm(perm) |
boolean |
Check if the current user has the specified permission |
changeUser(name, pass) |
boolean |
Change the current user |
getUser() |
string |
Get the current user name |
_G.user.sudo(psw: string): boolean
Set user as super user
-
psw: sting
- Password
-
isSu: boolean
- If the user is now super user
_G.user.isSu(): boolean
Check if the current user is the super user
-
isSu: boolean
- If the user is currently super user
_G.user.setSuPass(cPass: string, nPass: string): boolean
Set the super user password
-
cPass: string
- Current password -
nPass: string
- New Password
-
changed: boolean
- If the password was changed
_G.user.hasPerm(perm: string): boolean
Check if the current user has the specified permission
-
perm: string
- Permission to check for
has: boolean
_G.user.(name: string, pass: string): boolean
Change the current user
-
name: string
- New username -
pass: string
- New user password
changed: boolean
_G.user.getUser(): string
Get the current user name. DOES NOT GET SUPER USER
user: string