Class humhub\modules\admin\controllers\UserController

Inheritancehumhub\modules\admin\controllers\UserController » humhub\modules\admin\components\Controller » humhub\components\Controller » yii\web\Controller
Available since version0.5

User management

Public Properties

Hide inherited properties

PropertyTypeDescriptionDefined By
$actionTitlesMap array Page titles humhub\components\Controller
$adminOnly boolean If true only allows access for system admins else the access is restricted by getAccessRules() humhub\modules\admin\controllers\UserController
$loggedInOnly humhub\modules\admin\components\Controller
$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\modules\admin\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
actionAdd() humhub\modules\admin\controllers\UserController
actionDelete() Deletes a user permanently humhub\modules\admin\controllers\UserController
actionDisable() humhub\modules\admin\controllers\UserController
actionEdit() Edits a user humhub\modules\admin\controllers\UserController
actionEnable() humhub\modules\admin\controllers\UserController
actionExport() Export user list as csv or xlsx humhub\modules\admin\controllers\UserController
actionImpersonate() Redirect to user profile humhub\modules\admin\controllers\UserController
actionIndex() humhub\modules\admin\controllers\UserController
actionList() Returns a List of Users humhub\modules\admin\controllers\UserController
actionViewProfile() Redirect to user profile humhub\modules\admin\controllers\UserController
appendPageTitle() Append a page title. humhub\components\Controller
beforeAction() humhub\components\Controller
behaviors() humhub\modules\admin\components\Controller
canImpersonate() Determines if the current user can impersonate given user. humhub\modules\admin\controllers\UserController
checkGroupAccess() humhub\modules\admin\controllers\UserController
forcePostRequest() Throws HttpException in case the request is not an post request, otherwise returns true. humhub\components\Controller
getAccess() humhub\components\Controller
getAccessRules() Returns access rules for the standard access control behavior humhub\modules\admin\controllers\UserController
htmlRedirect() Create Redirect for AJAX Requests which output goes into HTML content. humhub\components\Controller
init() humhub\modules\admin\controllers\UserController
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

Events

Hide inherited events

EventTypeDescriptionDefined By
EVENT_INIT \yii\base\Event An event raised on init a controller. humhub\components\Controller

Property Details

$adminOnly public property

If true only allows access for system admins else the access is restricted by getAccessRules()

public boolean $adminOnly false

Method Details

actionAdd() public method

public void actionAdd ( )
actionDelete() public method

Deletes a user permanently

public void actionDelete ( $id )
$id
throws \yii\web\HttpException
actionDisable() public method

public void actionDisable ( $id )
$id
actionEdit() public method

Edits a user

public string actionEdit ( )
throws \yii\web\HttpException
actionEnable() public method

public void actionEnable ( $id )
$id
actionExport() public method

Export user list as csv or xlsx

public \yii\web\Response actionExport ( $format )
$format string

Supported format by phpspreadsheet

throws \PhpOffice\PhpSpreadsheet\Exception
throws \PhpOffice\PhpSpreadsheet\Writer\Exception
throws \yii\base\Exception
actionImpersonate() public method

Redirect to user profile

public \yii\base\Response actionImpersonate ( $id )
$id integer
return \yii\base\Response

The response

throws \yii\web\HttpException
actionIndex() public method

public void actionIndex ( )
actionList() public method

Returns a List of Users

public void actionList ( )
actionViewProfile() public method

Redirect to user profile

public \yii\base\Response actionViewProfile ( $id )
$id integer
return \yii\base\Response

The response

throws \yii\web\HttpException
canImpersonate() public static method

Determines if the current user can impersonate given user.

public static boolean canImpersonate ( $user )
$user humhub\modules\user\models\User
return boolean

Can impersonate

checkGroupAccess() public method

public void checkGroupAccess ( humhub\modules\user\models\User $user null )
$user
getAccessRules() public method

Returns access rules for the standard access control behavior

public array getAccessRules ( )
return array

The access permissions

init() public method

public void init ( )