Ubiquity 2.5.2
php rapid development framework
Loading...
Searching...
No Matches
AuthAccountCreationTrait Class Reference

Trait AuthAccountCreationTrait. More...

+ Inheritance diagram for AuthAccountCreationTrait:

Public Member Functions

 _addFrmAjaxBehavior ($id)
 
 _getPasswordInputName ()
 
 _getLoginInputName ()
 
 _getBodySelector ()
 
 checkEmail (string $key, string $hashMail)
 Route for email validation checking when creating a new account.
 
 addAccount ()
 Displays the account creation form.
 
 createAccount ()
 Submit for a new account creation.
 

Protected Member Functions

 getBaseUrl ()
 
 fMessage (FlashMessage $fMessage, $id=null)
 
 useAjax ()
 
 authLoadView ($viewName, $vars=[])
 
 rememberCaption ()
 
 loginLabel ()
 
 passwordConfLabel ()
 
 passwordLabel ()
 
 _getFiles ()
 
 hasAccountCreation ()
 Returns true for account creation.
 
 hasEmailValidation ()
 
 emailValidationDuration ()
 Returns the default validity duration of a mail validation link.
 
 createAccountMessage (FlashMessage $fMessage)
 To override for modifying the account creation message.
 
 canCreateAccountMessage (FlashMessage $fMessage)
 To override for modifying the account creation message information.
 
 createAccountErrorMessage (FlashMessage $fMessage)
 To override for modifying the error for account creation.
 
 emailValidationSuccess (FlashMessage $fMessage)
 To override Displayed when email is valid.
 
 emailValidationError (FlashMessage $fMessage)
 To override Displayed when email is invalid or if an error occurs.
 
 _create (string $login, string $password)
 To override For creating a new user account.
 
 _newAccountCreationRule (string $accountName)
 To override Returns true if the creation of $accountName is possible.
 
 _sendEmailValidation (string $email, string $validationURL, string $expire)
 Sends an email for email checking.
 
 getEmailFromNewAccount ($account)
 To override Returns the email from an account object.
 
 getAuthTokensEmailValidation ()
 To override Returns the AuthTokens instance used for tokens generation when sending an email for the account creation.
 
 generateEmailValidationUrl ($email)
 
 prepareEmailValidation (string $email)
 
 validateEmail (string $mail)
 To override Checks an email.
 

Static Protected Attributes

static string $TOKENS_VALIDATE_EMAIL ='email.validation'
 

Detailed Description

Trait AuthAccountCreationTrait.

Definition at line 17 of file AuthAccountCreationTrait.php.

Member Function Documentation

◆ _addFrmAjaxBehavior()

_addFrmAjaxBehavior (   $id)
abstract

Reimplemented in AuthController.

◆ _create()

_create ( string  $login,
string  $password 
)
protected

To override For creating a new user account.

Definition at line 116 of file AuthAccountCreationTrait.php.

◆ _getBodySelector()

_getBodySelector ( )
abstract

Reimplemented in AuthControllerConfig.

◆ _getFiles()

_getFiles ( )
abstractprotected

◆ _getLoginInputName()

_getLoginInputName ( )
abstract

Reimplemented in AuthControllerConfig.

◆ _getPasswordInputName()

_getPasswordInputName ( )
abstract

Reimplemented in AuthControllerConfig.

◆ _newAccountCreationRule()

_newAccountCreationRule ( string  $accountName)
protected

To override Returns true if the creation of $accountName is possible.

Parameters
string$accountName
Returns
bool

Definition at line 126 of file AuthAccountCreationTrait.php.

◆ _sendEmailValidation()

_sendEmailValidation ( string  $email,
string  $validationURL,
string  $expire 
)
protected

Sends an email for email checking.

Parameters
string$email
string$validationURL
string$expire

Definition at line 136 of file AuthAccountCreationTrait.php.

◆ addAccount()

addAccount ( )

Displays the account creation form.

Form is submited to /createAccount action

Definition at line 219 of file AuthAccountCreationTrait.php.

◆ authLoadView()

authLoadView (   $viewName,
  $vars = [] 
)
abstractprotected

◆ canCreateAccountMessage()

canCreateAccountMessage ( FlashMessage  $fMessage)
protected

To override for modifying the account creation message information.

Parameters
FlashMessage$fMessage

Definition at line 83 of file AuthAccountCreationTrait.php.

◆ checkEmail()

checkEmail ( string  $key,
string  $hashMail 
)

Route for email validation checking when creating a new account.

Parameters
string$key
string$hashMail

Definition at line 191 of file AuthAccountCreationTrait.php.

◆ createAccount()

createAccount ( )

Submit for a new account creation.

Postcondition

Definition at line 244 of file AuthAccountCreationTrait.php.

◆ createAccountErrorMessage()

createAccountErrorMessage ( FlashMessage  $fMessage)
protected

To override for modifying the error for account creation.

Parameters
FlashMessage$fMessage

Definition at line 91 of file AuthAccountCreationTrait.php.

◆ createAccountMessage()

createAccountMessage ( FlashMessage  $fMessage)
protected

To override for modifying the account creation message.

Parameters
FlashMessage$fMessage

Definition at line 75 of file AuthAccountCreationTrait.php.

◆ emailValidationDuration()

emailValidationDuration ( )
protected

Returns the default validity duration of a mail validation link.

Returns
\DateInterval

Definition at line 67 of file AuthAccountCreationTrait.php.

◆ emailValidationError()

emailValidationError ( FlashMessage  $fMessage)
protected

To override Displayed when email is invalid or if an error occurs.

Parameters
FlashMessage$fMessage

Definition at line 108 of file AuthAccountCreationTrait.php.

◆ emailValidationSuccess()

emailValidationSuccess ( FlashMessage  $fMessage)
protected

To override Displayed when email is valid.

Parameters
FlashMessage$fMessage

Definition at line 99 of file AuthAccountCreationTrait.php.

◆ fMessage()

fMessage ( FlashMessage  $fMessage,
  $id = null 
)
abstractprotected

◆ generateEmailValidationUrl()

generateEmailValidationUrl (   $email)
protected

Definition at line 159 of file AuthAccountCreationTrait.php.

◆ getAuthTokensEmailValidation()

getAuthTokensEmailValidation ( )
protected

To override Returns the AuthTokens instance used for tokens generation when sending an email for the account creation.

Returns
AuthTokens

Definition at line 155 of file AuthAccountCreationTrait.php.

◆ getBaseUrl()

getBaseUrl ( )
abstractprotected

◆ getEmailFromNewAccount()

getEmailFromNewAccount (   $account)
protected

To override Returns the email from an account object.

Parameters
mixed$account
Returns
string

Definition at line 146 of file AuthAccountCreationTrait.php.

◆ hasAccountCreation()

hasAccountCreation ( )
protected

Returns true for account creation.

Returns
boolean

Reimplemented in AuthControllerConfig.

Definition at line 51 of file AuthAccountCreationTrait.php.

◆ hasEmailValidation()

hasEmailValidation ( )
protected
Returns
bool

Definition at line 59 of file AuthAccountCreationTrait.php.

◆ loginLabel()

loginLabel ( )
abstractprotected

Reimplemented in AuthControllerConfig.

◆ passwordConfLabel()

passwordConfLabel ( )
abstractprotected

Reimplemented in AuthControllerConfig.

◆ passwordLabel()

passwordLabel ( )
abstractprotected

Reimplemented in AuthControllerConfig.

◆ prepareEmailValidation()

prepareEmailValidation ( string  $email)
protected

Definition at line 168 of file AuthAccountCreationTrait.php.

◆ rememberCaption()

rememberCaption ( )
abstractprotected

Reimplemented in AuthControllerConfig.

◆ useAjax()

useAjax ( )
abstractprotected

Reimplemented in AuthControllerConfig.

◆ validateEmail()

validateEmail ( string  $mail)
protected

To override Checks an email.

Parameters
string$mail
Returns
bool

Definition at line 181 of file AuthAccountCreationTrait.php.

Field Documentation

◆ $TOKENS_VALIDATE_EMAIL

string $TOKENS_VALIDATE_EMAIL ='email.validation'
staticprotected

Definition at line 19 of file AuthAccountCreationTrait.php.


The documentation for this class was generated from the following file: