|
Elgg
Version 7.1
|
User accounts service. More...
Public Member Functions | |
| __construct (protected Config $config, protected Translator $translator, protected PasswordService $passwords, protected EventsService $events, protected EmailService $email, protected PersistentLoginService $persistentLogin,) | |
| Constructor. More... | |
| validateAccountData (string $username, string|array $password, string $name, string $email, bool $allow_multiple_emails=false) | |
| Validate registration details to ensure they can be used to register a new user account. More... | |
| assertValidAccountData (string $username, string|array $password, string $name, string $email, bool $allow_multiple_emails=false) | |
| Assert that given registration details are valid and can be used to register the user. More... | |
| assertValidUsername (string $username, bool $assert_unregistered=false) | |
| Simple function which ensures that a username contains only valid characters. More... | |
| assertValidPassword (string|array $password) | |
| Simple validation of a password. More... | |
| assertCurrentPassword (\ElggUser $user, string $password) | |
| Assert that user can authenticate with the given password. More... | |
| assertValidEmail (string $address, bool $assert_unregistered=false) | |
| Simple validation of an email. More... | |
| isValidEmail (string $address) | |
| Validates an email address. More... | |
| requestNewEmailValidation (\ElggUser $user, string $email) | |
| Send out an e-mail to the new email address the user wanted. More... | |
| registerAuthenticationFailure (\ElggUser $user) | |
| Registers an authentication failure for a user. More... | |
| resetAuthenticationFailures (\ElggUser $user) | |
| Resets all authentication failures for a given user. More... | |
| isAuthenticationFailureLimitReached (\ElggUser $user, ?int $limit=null, ?int $lifetime=null) | |
| Checks if the authentication failure limit has been reached. More... | |
| changePassword (\ElggUser $user, string $password) | |
| Handle all the required steps to change the password of a user. More... | |
User accounts service.
Definition at line 20 of file Accounts.php.
| Elgg\Users\Accounts::__construct | ( | protected Config | $config, |
| protected Translator | $translator, | ||
| protected PasswordService | $passwords, | ||
| protected EventsService | $events, | ||
| protected EmailService | $email, | ||
| protected PersistentLoginService | $persistentLogin | ||
| ) |
Constructor.
| Config | $config | Config |
| Translator | $translator | Translator |
| PasswordService | $passwords | Passwords |
| EventsService | $events | Events service |
| EmailService | Email service | |
| PersistentLoginService | $persistentLogin | Persistent login service |
Definition at line 32 of file Accounts.php.
| Elgg\Users\Accounts::assertCurrentPassword | ( | \ElggUser | $user, |
| string | $password | ||
| ) |
Assert that user can authenticate with the given password.
| \ElggUser | $user | User entity |
| string | $password | Password |
| RegistrationException |
Definition at line 296 of file Accounts.php.
| Elgg\Users\Accounts::assertValidAccountData | ( | string | $username, |
| string|array | $password, | ||
| string | $name, | ||
| string | $email, | ||
| bool | $allow_multiple_emails = false |
||
| ) |
Assert that given registration details are valid and can be used to register the user.
| string | $username | The username of the new user |
| string | array | $password | The password |
| string | $name | The user's display name |
| string | The user's email address | |
| bool | $allow_multiple_emails | Allow the same email address to be registered multiple times? |
| RegistrationException |
Definition at line 104 of file Accounts.php.
| Elgg\Users\Accounts::assertValidEmail | ( | string | $address, |
| bool | $assert_unregistered = false |
||
| ) |
Simple validation of an email.
| string | $address | Email address |
| bool | $assert_unregistered | Also assert that the email address has not yet been used for a user account |
| RegistrationException |
Definition at line 311 of file Accounts.php.
| Elgg\Users\Accounts::assertValidPassword | ( | string|array | $password | ) |
Simple validation of a password.
| string | array | $password | Clear text password Can be an array [$password, $confirm_password] |
| RegistrationException |
Definition at line 262 of file Accounts.php.
| Elgg\Users\Accounts::assertValidUsername | ( | string | $username, |
| bool | $assert_unregistered = false |
||
| ) |
Simple function which ensures that a username contains only valid characters.
This should only permit chars that are valid on the file system as well.
| string | $username | Username |
| bool | $assert_unregistered | Also assert that the username has not yet been registered |
| RegistrationException |
Definition at line 191 of file Accounts.php.
| Elgg\Users\Accounts::changePassword | ( | \ElggUser | $user, |
| string | $password | ||
| ) |
Handle all the required steps to change the password of a user.
| \ElggUser | $user | User to change the password for |
| string | $password | New password |
Definition at line 467 of file Accounts.php.
| Elgg\Users\Accounts::isAuthenticationFailureLimitReached | ( | \ElggUser | $user, |
| ?int | $limit = null, |
||
| ?int | $lifetime = null |
||
| ) |
Checks if the authentication failure limit has been reached.
| \ElggUser | $user | User to check the limit for |
| int | null | $limit | (optional) number of allowed failures |
| int | null | $lifetime | (optional) number of seconds before a failure is considered expired |
Definition at line 432 of file Accounts.php.
| Elgg\Users\Accounts::isValidEmail | ( | string | $address | ) |
Validates an email address.
| string | $address | Email address |
Definition at line 345 of file Accounts.php.
| Elgg\Users\Accounts::registerAuthenticationFailure | ( | \ElggUser | $user | ) |
Registers an authentication failure for a user.
| \ElggUser | $user | user to log the failure for |
Definition at line 393 of file Accounts.php.
| Elgg\Users\Accounts::requestNewEmailValidation | ( | \ElggUser | $user, |
| string | |||
| ) |
Send out an e-mail to the new email address the user wanted.
| \ElggUser | $user | user with new e-mail address |
| string | E-mail address |
| InvalidArgumentException |
Definition at line 358 of file Accounts.php.
| Elgg\Users\Accounts::resetAuthenticationFailures | ( | \ElggUser | $user | ) |
Resets all authentication failures for a given user.
| \ElggUser | $user | user to clear the failures for |
Definition at line 409 of file Accounts.php.
| Elgg\Users\Accounts::validateAccountData | ( | string | $username, |
| string|array | $password, | ||
| string | $name, | ||
| string | $email, | ||
| bool | $allow_multiple_emails = false |
||
| ) |
Validate registration details to ensure they can be used to register a new user account.
| string | $username | The username of the new user |
| string | array | $password | The password Can be an array [$password, $confirm_password] |
| string | $name | The user's display name |
| string | The user's email address | |
| bool | $allow_multiple_emails | Allow the same email address to be registered multiple times? |
Definition at line 55 of file Accounts.php.