Account
in package
Class for the general management of the user account e.g. Deactivating the account
Table of Contents
Properties
Methods
- __construct() : mixed
- Initialize the user account class
- deactivate() : void
- Deactivate a user. He won't be able to log in. Use deactivate user when the user should not be able to use the account anymore, but you still need access to the user data.
- lock() : void
- Lock a user. The user won't be able to log in.
- reactivate() : void
- Reactivate a user. He will be able to log in again.
- setUserId() : void
- Set the userid
- unlock() : void
- Unlock a user. You'll get an error, if the user is not locked.
- request() : void
- Send a POST request to perform an action on a user account (e.g., deactivate, reactivate, lock, unlock).
Properties
$action
private
string
$action
$settings
private
array<string|int, mixed>
$settings
$userid
private
int
$userid
Methods
__construct()
Initialize the user account class
public
__construct(mixed $settings) : mixed
Parameters
- $settings : mixed
-
array The settings array
deactivate()
Deactivate a user. He won't be able to log in. Use deactivate user when the user should not be able to use the account anymore, but you still need access to the user data.
public
deactivate() : void
You'll get an error, if the user is already deactivated
Tags
lock()
Lock a user. The user won't be able to log in.
public
lock() : void
You'll get an error, if the user is not locked.
Tags
reactivate()
Reactivate a user. He will be able to log in again.
public
reactivate() : void
You'll get an error, if the user is not deactivated.
Tags
setUserId()
Set the userid
public
setUserId(mixed $userid) : void
Parameters
- $userid : mixed
-
int User id
unlock()
Unlock a user. You'll get an error, if the user is not locked.
public
unlock() : void
Tags
request()
Send a POST request to perform an action on a user account (e.g., deactivate, reactivate, lock, unlock).
private
request() : void