class vB5_Frontend_Controller_Auth extends vB5_Frontend_Controller

Properties

protected $vboptions vboptions * from vB5_Frontend_Controller

Methods

__construct()

No description

sendAsJson($data)

No description

showMsgPage(string $title, string $msg) deprecated

Show a simple and clear message page which contains no widget

toSeoFriendly(string $str)

Replaces special characters in a given string with dashes to make the string SEO friendly Note: This is really restrictive. If it can be helped, leave it to core's vB_String::getUrlIdent.

boolean
handleErrorsForAjax(mixed $result, mixed $return)

Handle errors that are returned by API for use in JSON AJAX responses.

verifyPostRequest()

Checks if this is a POST request

outputPage($html, $exit = true)

Any final processing, and then output the page

parseBbCodeForPreview($rawText, $options = array())

No description

addAttachments(mixed $data)

Adds attachment information so attachments can be created in one call

string
encodeFlashMessage(string $phrase)

Generates a signed message to pass to the following page, so that the message can be displayed briefly to the user (flashed).

actionLoginForm(array $errors = array(), array $formData = array())

No description

actionLogin()

No description

actionLoginDialog()

No description

actionAjaxLogin()

No description

boolean
actionLoginExternal()

Logs a user in via an exernal login provider

boolean
actionLoginAndAssociate()

Logs a user in via a vb login and connects them to a facebook account

actionLogout()

No description

actionLostpw()

Forgot password form action Reset url = /auth/lostpw/?action=pwreset&userid=&activationid=

actionResetPassword()

No description

Details

__construct()

sendAsJson($data)

Parameters

$data

showMsgPage(string $title, string $msg) deprecated

deprecated

Show a simple and clear message page which contains no widget

Parameters

string $title Page title. HTML will be escaped.
string $msg Message to display. HTML is allowed and the caller must make sure it's valid.

protected toSeoFriendly(string $str)

Replaces special characters in a given string with dashes to make the string SEO friendly Note: This is really restrictive. If it can be helped, leave it to core's vB_String::getUrlIdent.

Parameters

string $str The string to be converted

protected boolean handleErrorsForAjax(mixed $result, mixed $return)

Handle errors that are returned by API for use in JSON AJAX responses.

Parameters

mixed $result The result array to populate errors into. It will contain error phrase ids.
mixed $return The returned object by the API call.

Return Value

boolean true errors are found, false, otherwise.

protected verifyPostRequest()

Checks if this is a POST request

protected outputPage($html, $exit = true)

Any final processing, and then output the page

Parameters

$html
$exit

protected parseBbCodeForPreview($rawText, $options = array())

Parameters

$rawText
$options

protected addAttachments(mixed $data)

Adds attachment information so attachments can be created in one call

This will modify the $data array to add data under the keys 'attachments' for added attachments & 'removeattachments' for attachments requested for removal.

Parameters

mixed $data array of node data for insert

protected sendAsJsonAndCloseConnection($data)

Parameters

$data

protected string encodeFlashMessage(string $phrase)

Generates a signed message to pass to the following page, so that the message can be displayed briefly to the user (flashed).

Parameters

string $phrase The phrase key for the message to display

Return Value

string The signed value that should be passed as a query parameter using the format flashmsg=

at line 16
actionLoginForm(array $errors = array(), array $formData = array())

Parameters

array $errors
array $formData

at line 118
actionLogin()

at line 187
actionLoginDialog()

at line 222
actionAjaxLogin()

at line 286
boolean actionLoginExternal()

Logs a user in via an exernal login provider

Currently only facebook is supported.

Expects the a post with: * provider -- currently ignored, should be passed as "facebook" for future compatibility * auth -- Facebook auth token for FB user to connect to (provide by FB JS SDK)

outputs the result of the the loginExternal API call as JSON

Return Value

boolean

at line 392
boolean actionLoginAndAssociate()

Logs a user in via a vb login and connects them to a facebook account

Expects post fields for login (only one of the three password fields is strictly required -- Typically either the password (plain text) or the md5 pair are passed but not both): * password * vb_login_md5password * vb_login_md5password_utf * username * auth -- Facebook auth token for FB user to connect to (provide by FB JS SDK)

If the connection fails then login tokens will not be set and the user will not be logged in even if the login portion succeeds.

Will output a JSON object with either a standard error message or {'redirect' : $homepageurl}

Return Value

boolean

at line 430
actionLogout()

at line 451
actionLostpw()

Forgot password form action Reset url = /auth/lostpw/?action=pwreset&userid=&activationid=

at line 502
actionResetPassword()