PHP 클래스 Neos\Neos\Command\UserCommandController

상속: extends Neos\Flow\Cli\CommandController
파일 보기 프로젝트 열기: neos/neos-development-collection

보호된 프로퍼티들

프로퍼티 타입 설명
$authenticationProviderSettings array
$userService Neos\Neos\Domain\Service\UserService

공개 메소드들

메소드 설명
activateCommand ( string $username, string $authenticationProvider = null ) : void Activate a user
addRoleCommand ( string $username, string $role, string $authenticationProvider = null ) : void Add a role to a user
createCommand ( string $username, string $password, string $firstName, string $lastName, string $roles = null, string $authenticationProvider = null ) : void Create a new user
deactivateCommand ( string $username, string $authenticationProvider = null ) : void Deactivate a user
deleteCommand ( string $username, boolean $assumeYes = false, string $authenticationProvider = null ) : void Delete a user
listCommand ( ) : void List all users
removeRoleCommand ( string $username, string $role, string $authenticationProvider = null ) : void Remove a role from a user
setPasswordCommand ( string $username, string $password, string $authenticationProvider = null ) : void Set a new password for the given user
showCommand ( string $username, string $authenticationProvider = null ) : void Shows the given user

보호된 메소드들

메소드 설명
getTableRowForUser ( User $user ) : array Prepares a table row for output with data of the given User
getUserOrFail ( string $username, string $authenticationProviderName ) : User Retrieves the given user or fails by exiting with code 1 and a message

메소드 상세

activateCommand() 공개 메소드

This command reactivates possibly expired accounts for the given user. If an authentication provider is specified, this command will look for an account with the given username related to the given provider. Still, this command will activate all accounts of a user, once such a user has been found.
public activateCommand ( string $username, string $authenticationProvider = null ) : void
$username string The username of the user to be activated.
$authenticationProvider string Name of the authentication provider to use for finding the user. Example: "Typo3BackendProvider"
리턴 void

addRoleCommand() 공개 메소드

This command allows for adding a specific role to an existing user. Roles can optionally be specified as a comma separated list. For all roles provided by Neos, the role namespace "Neos.Neos:" can be omitted. If an authentication provider was specified, the user will be determined by an account identified by "username" related to the given provider. However, once a user has been found, the new role will be added to all existing accounts related to that user, regardless of its authentication provider.
public addRoleCommand ( string $username, string $role, string $authenticationProvider = null ) : void
$username string The username of the user
$role string Role to be added to the user, for example "Neos.Neos:Administrator" or just "Administrator"
$authenticationProvider string Name of the authentication provider to use. Example: "Typo3BackendProvider"
리턴 void

createCommand() 공개 메소드

This command creates a new user which has access to the backend user interface. More specifically, this command will create a new user and a new account at the same time. The created account is, by default, a Neos backend account using the the "Typo3BackendProvider" for authentication. The given username will be used as an account identifier for that new account. If an authentication provider name is specified, the new account will be created for that provider instead. Roles for the new user can optionally be specified as a comma separated list. For all roles provided by Neos, the role namespace "Neos.Neos:" can be omitted.
public createCommand ( string $username, string $password, string $firstName, string $lastName, string $roles = null, string $authenticationProvider = null ) : void
$username string The username of the user to be created, used as an account identifier for the newly created account
$password string Password of the user to be created
$firstName string First name of the user to be created
$lastName string Last name of the user to be created
$roles string A comma separated list of roles to assign. Examples: "Editor, Acme.Foo:Reviewer"
$authenticationProvider string Name of the authentication provider to use for the new account. Example: "Typo3BackendProvider"
리턴 void

deactivateCommand() 공개 메소드

This command deactivates a user by flagging all of its accounts as expired. If an authentication provider is specified, this command will look for an account with the given username related to the given provider. Still, this command will deactivate all accounts of a user, once such a user has been found.
public deactivateCommand ( string $username, string $authenticationProvider = null ) : void
$username string The username of the user to be deactivated.
$authenticationProvider string Name of the authentication provider to use for finding the user. Example: "Typo3BackendProvider"
리턴 void

deleteCommand() 공개 메소드

This command deletes an existing Neos user. All content and data directly related to this user, including but not limited to draft workspace contents, will be removed as well. All accounts owned by the given user will be deleted. If an authentication provider is specified, this command will look for an account with the given username related to the given provider. Specifying an authentication provider does not mean that only the account for that provider is deleted! If a user was found by the combination of username and authentication provider, all related accounts will be deleted.
public deleteCommand ( string $username, boolean $assumeYes = false, string $authenticationProvider = null ) : void
$username string The username of the user to be removed
$assumeYes boolean Assume "yes" as the answer to the confirmation dialog
$authenticationProvider string Name of the authentication provider to use. Example: "Typo3BackendProvider"
리턴 void

getTableRowForUser() 보호된 메소드

Prepares a table row for output with data of the given User
protected getTableRowForUser ( User $user ) : array
$user Neos\Neos\Domain\Model\User The user
리턴 array

getUserOrFail() 보호된 메소드

Retrieves the given user or fails by exiting with code 1 and a message
protected getUserOrFail ( string $username, string $authenticationProviderName ) : User
$username string Username of the user to find
$authenticationProviderName string Name of the authentication provider to use
리턴 Neos\Neos\Domain\Model\User The user

listCommand() 공개 메소드

This command lists all existing Neos users.
public listCommand ( ) : void
리턴 void

removeRoleCommand() 공개 메소드

This command allows for removal of a specific role from an existing user. If an authentication provider was specified, the user will be determined by an account identified by "username" related to the given provider. However, once a user has been found, the role will be removed from all existing accounts related to that user, regardless of its authentication provider.
public removeRoleCommand ( string $username, string $role, string $authenticationProvider = null ) : void
$username string The username of the user
$role string Role to be removed from the user, for example "Neos.Neos:Administrator" or just "Administrator"
$authenticationProvider string Name of the authentication provider to use. Example: "Typo3BackendProvider"
리턴 void

setPasswordCommand() 공개 메소드

This command sets a new password for an existing user. More specifically, all accounts related to the user which are based on a username / password token will receive the new password. If an authentication provider was specified, the user will be determined by an account identified by "username" related to the given provider.
public setPasswordCommand ( string $username, string $password, string $authenticationProvider = null ) : void
$username string Username of the user to modify
$password string The new password
$authenticationProvider string Name of the authentication provider to use for finding the user. Example: "Typo3BackendProvider"
리턴 void

showCommand() 공개 메소드

This command shows some basic details about the given user. If such a user does not exist, this command will exit with a non-zero status code. The user will be retrieved by looking for a Neos backend account with the given identifier (ie. the username) and then retrieving the user which owns that account. If an authentication provider is specified, this command will look for an account identified by "username" for that specific provider.
public showCommand ( string $username, string $authenticationProvider = null ) : void
$username string The username of the user to show. Usually refers to the account identifier of the user's Neos backend account.
$authenticationProvider string Name of the authentication provider to use. Example: "Typo3BackendProvider"
리턴 void

프로퍼티 상세

$authenticationProviderSettings 보호되어 있는 프로퍼티

protected array $authenticationProviderSettings
리턴 array

$userService 보호되어 있는 프로퍼티

protected UserService,Neos\Neos\Domain\Service $userService
리턴 Neos\Neos\Domain\Service\UserService