This class contains all functions for the process of password reset and creating new administration users and sending email to those with a link to set the password.
All this functions were implemented in UserManagementController before.
package | Default |
---|
__construct( $user)
\User
generateAdminCreationEmail(): mixed
mixed
$aAdminEmail array with subject and email body
getRandomPassword(integer $length = self::MIN_PASSWORD_LENGTH): string|null
todo | it's fine to use static functions, until it is used only in controllers ... |
---|
integer
Length of the password
string|null
getRenderArray(): array
array
isAllowedToSendForgotPwEmail(\User $user): boolean
This should only be the case all 5min (see self::MIN_TIME_NEXT_FORGOT_PW_EMAIL)
Throws |
|
---|
\User
boolean
true if user can send another email for forgotten pw, false otherwise
sendAdminMail(string $type = self::EMAIL_TYPE_REGISTRATION): \LimeMailer
Throws |
|
---|
string
two types are available 'resetPassword' or 'registration', default is 'registration'
\LimeMailer
if send is successful
sendForgotPasswordEmailLink(): string
string
message for user
sendPasswordLinkViaEmail(string $emailType): array
Throws |
|
---|
string
this could be 'registration' or 'resetPassword' (see const in this class)
array
message if sending email to user was successful
MIN_PASSWORD_LENGTH
EMAIL_TYPE_REGISTRATION
EMAIL_TYPE_RESET_PW
MIN_TIME_NEXT_FORGOT_PW_EMAIL
user :
var | \User |
---|