Class humhub\modules\user\controllers\AuthController

Inheritancehumhub\modules\user\controllers\AuthController » humhub\components\Controller » yii\web\Controller
Available since version0.5

AuthController handles login and logout

Public Properties

Hide inherited properties

PropertyTypeDescriptionDefined By
$actionTitlesMap array Page titles humhub\components\Controller
$layout humhub\modules\user\controllers\AuthController
$pageTitle string Title of the rendered page humhub\components\Controller
$prependActionTitles boolean Append page title humhub\components\Controller
$subLayout null|string The name of the sub layout to be applied to this controller's views. humhub\components\Controller

Protected Properties

Hide inherited properties

PropertyTypeDescriptionDefined By
$access string Defines the ControllerAccess class for this controller responsible for managing access rules humhub\components\Controller

Public Methods

Hide inherited methods

MethodDescriptionDefined By
actionGetSessionUserJson() Allows third party applications to convert a valid sessionId into a username. humhub\modules\user\controllers\AuthController
actionLogin() Displays the login page humhub\modules\user\controllers\AuthController
actionLogout() Logouts a User humhub\modules\user\controllers\AuthController
actions() humhub\modules\user\controllers\AuthController
appendPageTitle() Append a page title. humhub\components\Controller
beforeAction() humhub\modules\user\controllers\AuthController
behaviors() humhub\components\Controller
forcePostRequest() Throws HttpException in case the request is not an post request, otherwise returns true. humhub\components\Controller
getAccess() humhub\components\Controller
htmlRedirect() Create Redirect for AJAX Requests which output goes into HTML content. humhub\components\Controller
init() humhub\components\Controller
onAuthSuccess() Handle successful authentication humhub\modules\user\controllers\AuthController
prependPageTitle() Prepend a page title. humhub\components\Controller
redirect() humhub\components\Controller
renderAjaxContent() humhub\components\Controller
renderContent() Renders a static string by applying the layouts (sublayout + layout. humhub\components\Controller
renderModalClose() Closes a modal humhub\components\Controller
setActionTitles() Set a map that indicates what page title should be shown for the currently active action. humhub\components\Controller
setJsViewStatus() Sets some ui state as current controller/module and active topmenu. humhub\components\Controller
setPageTitle() Set the page title. humhub\components\Controller

Protected Methods

Hide inherited methods

MethodDescriptionDefined By
forbidden() humhub\components\Controller
getAccessRules() Returns access rules for the standard access control behavior. humhub\components\Controller
login() Login user humhub\modules\user\controllers\AuthController


Hide inherited events

EventTypeDescriptionDefined By
EVENT_AFTER_LOGIN \humhub\modules\user\controllers\Triggered After an successful login. humhub\modules\user\controllers\AuthController
EVENT_INIT \yii\base\Event An event raised on init a controller. humhub\components\Controller

Property Details

$layout public property
public $layout '@humhub/modules/user/views/layouts/main'

Method Details

actionGetSessionUserJson() public method

Allows third party applications to convert a valid sessionId into a username.

public void actionGetSessionUserJson ( )
actionLogin() public method

Displays the login page

public void actionLogin ( )
actionLogout() public method

Logouts a User

public void actionLogout ( )
actions() public method

public void actions ( )
beforeAction() public method

public void beforeAction ( $action )
login() protected method

Login user

protected \humhub\modules\user\controllers\Response login ( $user, $authClient )
$user humhub\modules\user\models\User
$authClient \yii\authclient\BaseClient
return \humhub\modules\user\controllers\Response

The current response object

onAuthSuccess() public method

Handle successful authentication

public \humhub\modules\user\controllers\Response onAuthSuccess ( \yii\authclient\BaseClient $authClient )
$authClient \yii\authclient\BaseClient
throws Throwable

Event Details

EVENT_AFTER_LOGIN event of type \humhub\modules\user\controllers\Triggered

After an successful login. Note: In contrast to User::EVENT_AFTER_LOGIN, this event is triggered after the response is generated.