PHP Class EntryController, vanilla

Inheritance: extends BaseAppController
Show file Open project: vanilla/vanilla Class Usage Examples

Public Properties

Property Type Description
$Form Gdn_Form
$UserModel UserModel
$UsernameError Reusable username requirement error message.
$Uses Models to include.

Protected Properties

Property Type Description
$_RealDeliveryType Place to store DeliveryType.

Public Methods

Method Description
__construct ( ) Setup error message & override MasterView for popups.
auth ( string $AuthenticationSchemeAlias = 'default' ) Authenticate the user attempting to sign in.
connect ( string $Method ) SSO facilitator page. Plugins use event ConnectData to complete SSO connections.
emailConfirm ( integer $UserID, string $EmailKey = '' ) Confirm email address is valid via sent code.
emailConfirmRequest ( integer $UserID = '' ) Send email confirmation message to user.
handshake ( string $AuthenticationSchemeAlias = 'default' ) Create secure handshake with remote authenticator.
index ( ) Default to SignIn().
initialize ( ) Include JS and CSS used by all methods.
leave ( string $AuthenticationSchemeAlias = 'default', string $TransientKey = '' ) Does actual de-authentication of a user. Used by SignOut().
password ( ) Auth via password.
passwordRequest ( ) Request password reset.
passwordReset ( integer $UserID = '', string $PasswordResetKey = '' ) Do password reset.
redirectTo ( ) : string Go to requested Target() or the default controller if none was set.
register ( string $InvitationCode = '' ) Calls the appropriate registration method based on the configuration setting.
registerInvitation ( integer $InvitationCode ) Invitation-only registration. Requires code.
registerThanks ( ) Display registration thank-you message
signIn ( string $Method = false, array $Arg1 = false ) : string Signin process that multiple authentication methods.
signIn2 ( ) : void Auth via default method. Simpler, old version of SignIn().
signOut ( string $TransientKey = "", $Override = "0" ) Good afternoon, good evening, and goodnight.
syncScreen ( object $Authenticator, array $UserInfo, array $Payload ) Attempt to syncronize user data from remote system into Dashboard.
target ( string $Target = false ) : string Set where to go after signin.

Protected Methods

Method Description
_registrationView ( ) : string Alias of EntryController::getRegistrationHandler
_setRedirect ( boolean $CheckPopup = false ) After sign in, send them along.
checkOverride ( string $Type, string $Target, string $TransientKey = null ) Check the default provider to see if it overrides one of the entry methods and then redirect.
getRegistrationhandler ( ) : string Select view/method to be used for registration (from config).

Private Methods

Method Description
registerApproval ( ) Registration that requires approval.
registerBasic ( ) Captcha-authenticated registration. Used by default.
registerCaptcha ( ) Captcha-authenticated registration.
registerClosed ( ) Registration not allowed.
registerConnect ( ) Connect registration

Method Details

__construct() public method

Setup error message & override MasterView for popups.
Since: 2.0.0
public __construct ( )

_registrationView() protected method

Alias of EntryController::getRegistrationHandler
Deprecation: since 2.3
protected _registrationView ( ) : string
return string

_setRedirect() protected method

After sign in, send them along.
Since: 2.0.0
protected _setRedirect ( boolean $CheckPopup = false )
$CheckPopup boolean

auth() public method

Events: BeforeAuth
Since: 2.0.0
public auth ( string $AuthenticationSchemeAlias = 'default' )
$AuthenticationSchemeAlias string Type of authentication we're attempting.

checkOverride() protected method

Check the default provider to see if it overrides one of the entry methods and then redirect.
protected checkOverride ( string $Type, string $Target, string $TransientKey = null )
$Type string One of the following. - SignIn - Register - SignOut (not complete)
$Target string
$TransientKey string

connect() public method

Users only see this page for non-seamless connections that prompt them to finish connecting by entering a username and/or password (and possibly email).
Since: 2.0.0
public connect ( string $Method )
$Method string Used to register multiple providers on ConnectData event.

emailConfirm() public method

Confirm email address is valid via sent code.
Since: 2.0.0
public emailConfirm ( integer $UserID, string $EmailKey = '' )
$UserID integer
$EmailKey string Authenticate with unique, 1-time code sent via email.

emailConfirmRequest() public method

Send email confirmation message to user.
Since: 2.0.?
public emailConfirmRequest ( integer $UserID = '' )
$UserID integer

getRegistrationhandler() protected method

Select view/method to be used for registration (from config).
Since: 2.3
protected getRegistrationhandler ( ) : string
return string Method name to invoke for registration

handshake() public method

Create secure handshake with remote authenticator.
Since: 2.0.?
Author: Tim Gunter
public handshake ( string $AuthenticationSchemeAlias = 'default' )
$AuthenticationSchemeAlias string (default: 'default')

index() public method

Default to SignIn().
Since: 2.0.0
public index ( )

initialize() public method

Always called by dispatcher before controller's requested method.
Since: 2.0.0
public initialize ( )

leave() public method

Does actual de-authentication of a user. Used by SignOut().
Since: 2.0.0
public leave ( string $AuthenticationSchemeAlias = 'default', string $TransientKey = '' )
$AuthenticationSchemeAlias string
$TransientKey string Unique value to prove intent.

password() public method

Auth via password.
Since: 2.0.0
public password ( )

passwordRequest() public method

Request password reset.
Since: 2.0.0
public passwordRequest ( )

passwordReset() public method

Do password reset.
Since: 2.0.0
public passwordReset ( integer $UserID = '', string $PasswordResetKey = '' )
$UserID integer Unique.
$PasswordResetKey string Authenticate with unique, 1-time code sent via email.

redirectTo() public method

Go to requested Target() or the default controller if none was set.
Since: 2.0.0
public redirectTo ( ) : string
return string URL.

register() public method

Events: Register
Since: 2.0.0
public register ( string $InvitationCode = '' )
$InvitationCode string Unique code given to invited user.

registerInvitation() public method

Invitation-only registration. Requires code.
Since: 2.0.0
public registerInvitation ( integer $InvitationCode )
$InvitationCode integer

registerThanks() public method

Display registration thank-you message
Since: 2.1
public registerThanks ( )

signIn() public method

Signin process that multiple authentication methods.
Since: 2.0.0
Author: Tim Gunter
public signIn ( string $Method = false, array $Arg1 = false ) : string
$Method string
$Arg1 array
return string Rendered XHTML template.

signIn2() public method

Events: SignIn
public signIn2 ( ) : void
return void

signOut() public method

Events: SignOut
Since: 2.0.0
public signOut ( string $TransientKey = "", $Override = "0" )
$TransientKey string (default: "")

syncScreen() public method

Attempt to syncronize user data from remote system into Dashboard.
Since: 2.0.?
Author: Tim Gunter
public syncScreen ( object $Authenticator, array $UserInfo, array $Payload )
$Authenticator object
$UserInfo array
$Payload array

target() public method

Set where to go after signin.
Since: 2.0.0
public target ( string $Target = false ) : string
$Target string Where we're requested to go to.
return string URL to actually go to (validated & safe).

Property Details

$Form public property

public Gdn_Form $Form
return Gdn_Form

$UserModel public property

public UserModel $UserModel
return UserModel

$UsernameError public property

Reusable username requirement error message.
public $UsernameError

$Uses public property

Models to include.
public $Uses

$_RealDeliveryType protected property

Place to store DeliveryType.
protected $_RealDeliveryType