Neos\Flow\Security\Account::getAccountIdentifier PHP Метод

getAccountIdentifier() публичный Метод

Returns the account identifier
public getAccountIdentifier ( ) : string
Результат string The account identifier
    public function getAccountIdentifier()
    {
        return $this->accountIdentifier;
    }

Usage Example

 /**
  * Creates a personal workspace for the given user's account if it does not exist already.
  *
  * @param User $user The new user to create a workspace for
  * @param Account $account The user's backend account
  * @throws IllegalObjectTypeException
  */
 protected function createPersonalWorkspace(User $user, Account $account)
 {
     $userWorkspaceName = UserUtility::getPersonalWorkspaceNameForUsername($account->getAccountIdentifier());
     $userWorkspace = $this->workspaceRepository->findByIdentifier($userWorkspaceName);
     if ($userWorkspace === null) {
         $liveWorkspace = $this->workspaceRepository->findByIdentifier('live');
         if (!$liveWorkspace instanceof Workspace) {
             $liveWorkspace = new Workspace('live');
             $liveWorkspace->setTitle('Live');
             $this->workspaceRepository->add($liveWorkspace);
         }
         $userWorkspace = new Workspace($userWorkspaceName, $liveWorkspace, $user);
         $userWorkspace->setTitle((string) $user->getName());
         $this->workspaceRepository->add($userWorkspace);
     }
 }
All Usage Examples Of Neos\Flow\Security\Account::getAccountIdentifier