class UsersController extends AbstractModuleController (View source)

The Neos User Admin module controller that allows for managing Neos users

Traits

A trait to add backend translation based on the backend users settings

Properties

protected Service $_localizationService from  BackendUserTranslationTrait
protected UserService $_userService from  BackendUserTranslationTrait
protected array $moduleConfiguration from  AbstractModuleController
protected PrivilegeManagerInterface $privilegeManager
protected PolicyService $policyService
protected UserService $userService
protected User $currentUser
protected TokenAndProviderFactoryInterface $tokenAndProviderFactory
protected array $authenticationProviderSettings

Methods

void
initializeObject()

Set the locale according to the user settings

void
initializeAction()

No description

void
initializeView(ViewInterface $view)

No description

void
setTitle(string $title)

Use this method to set an alternative title than the module label

void
indexAction(string $searchTerm = '')

Shows a list of all users

Message
getErrorFlashMessage()

Display no flash message at all on errors.

void
showAction(User $user)

Shows details for the specified user

void
newAction(User $user = null)

Renders a form for creating a new user

void
createAction(string $username, array $password, User $user, array $roleIdentifiers, string $authenticationProviderName = null)

Create a new user

void
editAction(User $user)

Edit an existing user

void
updateAction(User $user)

Update a given user

void
deleteAction(User $user)

Delete the given user

void
editAccountAction(Account $account)

Edit the given account

void
updateAccountAction(Account $account, array $roleIdentifiers, array $password = [])

Update a given account

void
newElectronicAddressAction(User $user)

The add new electronic address action

void
createElectronicAddressAction(User $user, ElectronicAddress $electronicAddress)

Create an new electronic address

void
deleteElectronicAddressAction(User $user, ElectronicAddress $electronicAddress)

Delete an electronic address action

void
array
getAuthenticationProviders()

Returns sorted list of auth providers by name.

array
getAllowedRoles()

Returns the roles that the current editor is able to assign Administrator can assign any roles, other users can only assign their own roles

bool
isEditingAllowed(User $user)

Returns whether the current user is allowed to edit the given user.

Details

protected void initializeObject()

Set the locale according to the user settings

Return Value

void

protected void initializeAction()

No description

Return Value

void

Exceptions

NoSuchArgumentException

protected void initializeView(ViewInterface $view)

No description

Parameters

ViewInterface $view

Return Value

void

void setTitle(string $title)

Use this method to set an alternative title than the module label

Parameters

string $title

Return Value

void

void indexAction(string $searchTerm = '')

Shows a list of all users

Parameters

string $searchTerm

Return Value

void

protected Message getErrorFlashMessage()

Display no flash message at all on errors.

Return Value

Message

returns false

void showAction(User $user)

Shows details for the specified user

Parameters

User $user

Return Value

void

void newAction(User $user = null)

Renders a form for creating a new user

Parameters

User $user

Return Value

void

void createAction(string $username, array $password, User $user, array $roleIdentifiers, string $authenticationProviderName = null)

Create a new user

Parameters

string $username

The user name (ie. account identifier) of the new user

array $password

Expects an array in the format array('', '')

User $user

The user to create

array $roleIdentifiers

A list of roles (role identifiers) to assign to the new user

string $authenticationProviderName

Optional name of the authentication provider. If not provided the user server uses the default authentication provider

Return Value

void

Exceptions

NoSuchRoleException
StopActionException
Exception

void editAction(User $user)

Edit an existing user

Parameters

User $user

Return Value

void

void updateAction(User $user)

Update a given user

Parameters

User $user

The user to update, including updated data already (name, email address etc)

Return Value

void

Exceptions

StopActionException

void deleteAction(User $user)

Delete the given user

Parameters

User $user

Return Value

void

Exceptions

Exception
StopActionException

void editAccountAction(Account $account)

Edit the given account

Parameters

Account $account

Return Value

void

Exceptions

Exception

void updateAccountAction(Account $account, array $roleIdentifiers, array $password = [])

Update a given account

Parameters

Account $account

The account to update

array $roleIdentifiers

A possibly updated list of roles for the user's primary account

array $password

Expects an array in the format array('', '')

Return Value

void

Exceptions

StopActionException
ForwardException
NoSuchRoleException
Exception

void newElectronicAddressAction(User $user)

The add new electronic address action

Parameters

User $user

Return Value

void

void createElectronicAddressAction(User $user, ElectronicAddress $electronicAddress)

Create an new electronic address

Parameters

User $user
ElectronicAddress $electronicAddress

Return Value

void

Exceptions

StopActionException

void deleteElectronicAddressAction(User $user, ElectronicAddress $electronicAddress)

Delete an electronic address action

Parameters

User $user
ElectronicAddress $electronicAddress

Return Value

void

Exceptions

StopActionException

protected void assignElectronicAddressOptions()

No description

Return Value

void

protected array getAuthenticationProviders()

Returns sorted list of auth providers by name.

Return Value

array

protected array getAllowedRoles()

Returns the roles that the current editor is able to assign Administrator can assign any roles, other users can only assign their own roles

Return Value

array

Exceptions

NoSuchRoleException
Exception

protected bool isEditingAllowed(User $user)

Returns whether the current user is allowed to edit the given user.

Administrators can edit anybody.

Parameters

User $user

Return Value

bool