You are here

function _opigno_moxtra_is_user_enabled in Opigno Moxtra 8

Same name and namespace in other branches
  1. 3.x opigno_moxtra.module \_opigno_moxtra_is_user_enabled()

Check if the user is enabled in the Moxtra.

Parameters

\Drupal\user\UserInterface $user: User.

Return value

bool True if user is enabled.

6 calls to _opigno_moxtra_is_user_enabled()
MoxtraMembershipController::addToAllWorkspaceUserAutocomplete in src/Controller/MoxtraMembershipController.php
Returns all users for the autocompletion.
MoxtraMembershipController::addToGroupWorkspaceUserAutocomplete in src/Controller/MoxtraMembershipController.php
Returns users of current group for the autocompletion.
opigno_moxtra_group_content_insert in ./opigno_moxtra.module
Implements hook_ENTITY_TYPE_insert().
opigno_moxtra_user_presave in ./opigno_moxtra.module
Implements hook_ENTITY_TYPE_presave().
WorkspaceForm::buildForm in src/Form/WorkspaceForm.php
Form constructor.

... See full list

File

./opigno_moxtra.module, line 194
Contains opigno_moxtra.module.

Code

function _opigno_moxtra_is_user_enabled(UserInterface $user) {
  return $user
    ->hasRole(OPIGNO_MOXTRA_COLLABORATIVE_FEATURES_RID);
}