Download the PHP package phoxphp/auth without Composer
On this page you can find all versions of the php package phoxphp/auth. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Informations about the package auth
PhoxPHP Authentication Component
Features:
- Register
- Login
- Logout
- Activate account
- Block account
- Delete account
- Change password
Register
To register a user, you use the register method which requires just three parameters. Namely:
- password
- verifyPassword
When registering a user, you can login automatically after registration by setting auto_login to true in the configuration settings.
Login
The login method is used to log a user in. To redirect automatically after a user has been logged in, you need to set auto_redirect to true in the configuration settings.
Logout
Activate account
To activate an account, you need to use the activateAccount. This method requires just one parameter which is the user's confirmation_code. By default, a user's account is not activated when registered but you can allow auto activation by setting auto_activate to true in the configuration settings.
Block account
To block an account, you need to use blockAccount method. This method requires just one parameter which must either be the user's email or the user's id.
Unblock account
To unblock an account, you need to use unblockAccount method. This method requires just one parameter which must either be the user's email or the user's id just like the blockAccount method.
Delete account
To delete an account, use the deleteAccount method. It requires a single parameter which must either be the user's email or the user's id. This method returns true if the account deleted successfully.
Change password
To update a user's password, you can use the changePassword method. The method requires two parameters which namely:
- oldPassword
- newPassword
The first parameter (oldPaasword) must be the user's current password and the second parameter (newPassword) must be the new password. This method returns true if the password changed successfully.