Class humhub\modules\user\Module

Inheritancehumhub\modules\user\Module » humhub\components\Module » yii\base\Module

User Module

Public Properties

Hide inherited properties

PropertyTypeDescriptionDefined By
$adminCanChangeUserProfileImages boolean Allow admin users to modify user profile image and banner humhub\modules\user\Module
$controllerNamespace humhub\modules\user\Module
$disableFollow boolean Defines if the user following is disabled or not. humhub\modules\user\Module
$displayNameCallback callable A callback that returns the user displayName humhub\modules\user\Module
$displayNameSubCallback callable A callback that returns the user displayName sub text humhub\modules\user\Module
$emailRequired boolean Defines mark user e-mail field as required humhub\modules\user\Module
$loginRememberMeDefault boolean Default state of remember me checkbox on login page humhub\modules\user\Module
$loginRememberMeDuration integer Number of seconds that the user can remain in logged-in status if remember me is clicked on login humhub\modules\user\Module
$logoutUrl string Redirect url after logout (if not set, home url will be used) humhub\modules\user\Module
$maximumUsernameLength integer Maximum username length humhub\modules\user\Module
$minimumUsernameLength integer Minimum username length humhub\modules\user\Module
$passwordStrength array Defines empty additional rules for password validation humhub\modules\user\Module
$profileDefaultRoute string The default route for user profiles humhub\modules\user\Module
$resourcesPath string The path for module resources (images, javascripts) Also module related assets like README. humhub\components\Module
$sendInviteMailsInGlobalLanguage boolean Option to translate all invite mails except self invites to the default language (true) or user language (false) humhub\modules\user\Module
$softDeleteKeepProfileFields array Profile field names to keep after user soft deletion humhub\modules\user\Module
$userListPaginationSize integer The default pagination size of the user list lightbox humhub\modules\user\Module

Public Methods

Hide inherited methods

MethodDescriptionDefined By
disable() Disables a module humhub\components\Module
enable() Enables this module humhub\components\Module
getActivityClasses() Returns a list of activity class names this modules provides. humhub\components\Module
getAssetClasses() Returns a list of asset class names this modules provides. humhub\components\Module
getAssetPath() humhub\components\Module
getAssetsUrl() Get Assets Url humhub\components\Module
getConfigUrl() URL to the module's configuration action humhub\components\Module
getDescription() Returns modules description provided by module.json file humhub\components\Module
getImage() Returns image url for this module Place your modules image in /module_image.png humhub\components\Module
getName() Returns modules name provided by module.json file humhub\modules\user\Module
getNotifications() Returns a list of notification classes this module provides. humhub\modules\user\Module
getPasswordStrength() humhub\modules\user\Module
getPermissions() Returns a list of permission objects this module provides. humhub\modules\user\Module
getPublishedUrl() Returns the url of an asset file and publishes all module assets if the file is not published yet. humhub\components\Module
getVersion() Returns modules version number provided by module.json file humhub\components\Module
hasNotifications() Determines whether the module has notification classes or not humhub\components\Module
init() humhub\components\Module
isCustomPasswordStrength() humhub\modules\user\Module
isPublished() Checks if a specific asset file has already been published humhub\components\Module
migrate() Execute all not applied module migrations humhub\components\Module
publishAssets() Publishes the basePath/resourcesPath (assets) module directory if existing. humhub\components\Module
update() This method is called after an update is performed. humhub\components\Module

Protected Methods

Hide inherited methods

MethodDescriptionDefined By
getModuleInfo() Reads module.json which contains basic module information and returns it as array humhub\components\Module

Property Details

$adminCanChangeUserProfileImages public property (available since version 1.2)

Allow admin users to modify user profile image and banner

See also humhub\modules\user\widgets\ProfileHeader.

$controllerNamespace public property
public $controllerNamespace 'humhub\modules\user\controllers'
$disableFollow public property (available since version 1.2)

Defines if the user following is disabled or not.

public boolean $disableFollow false
$displayNameCallback public property (available since version 1.2)

A callback that returns the user displayName

$displayNameSubCallback public property

A callback that returns the user displayName sub text

$emailRequired public property (available since version 1.2.2)

Defines mark user e-mail field as required

public boolean $emailRequired true
$loginRememberMeDefault public property

Default state of remember me checkbox on login page

$loginRememberMeDuration public property

Number of seconds that the user can remain in logged-in status if remember me is clicked on login

$logoutUrl public property

Redirect url after logout (if not set, home url will be used)

public string $logoutUrl null
$maximumUsernameLength public property (available since version 1.3)

Maximum username length

$minimumUsernameLength public property (available since version 1.2)

Minimum username length

$passwordStrength public property

Defines empty additional rules for password validation

$profileDefaultRoute public property

The default route for user profiles

$sendInviteMailsInGlobalLanguage public property

Option to translate all invite mails except self invites to the default language (true) or user language (false)

$softDeleteKeepProfileFields public property (available since version 1.3)

Profile field names to keep after user soft deletion

public array $softDeleteKeepProfileFields = ['firstname''lastname']
$userListPaginationSize public property

The default pagination size of the user list lightbox

See also humhub\modules\user\widgets\UserListBox.

Method Details

getName() public method

Returns modules name provided by module.json file

public string getName ( )
return string

Name

getNotifications() public method

Returns a list of notification classes this module provides.

public array getNotifications ( )
return array

List of notification classes

getPasswordStrength() public method

public void getPasswordStrength ( )
getPermissions() public method

Returns a list of permission objects this module provides.

If a content container is provided, the method should only return applicable permissions for the given container. This function should also make sure the module is installed on the given container in case the permission only affects installed features.

public array getPermissions ( $contentContainer null )
$contentContainer humhub\modules\content\components\ContentContainerActiveRecord

Optional contentcontainer

return array

List of permissions

isCustomPasswordStrength() public method

public void isCustomPasswordStrength ( )