public function promote($username)
    {
        $user = $this->findUserByUsernameOrThrowException($username);
        $user->setSuperAdmin(true);
        $this->userManager->updateUser($user);

        $event = new UserEvent($user, $this->getRequest());
        $this->dispatcher->dispatch(Events::USER_PROMOTED, $event);
    }
public function promote($username)
    {
        $user = $this->findUserByUsernameOrThrowException($username);
        $user->setSuperAdmin(true);
        $this->userManager->updateUser($user);

        $event = new UserEvent($user, $this->getRequest());
        $this->dispatcher->dispatch(Events::USER_PROMOTED, $event);
    }
public function promote ( $ username ) { $ user = $ this -> findUserByUsernameOrThrowException ( $ username ) ; $ user -> setSuperAdmin ( true ) ; $ this -> userManager -> updateUser ( $ user ) ; $ event = new UserEvent ( $ user , $ this -> getRequest ( ) ) ; $ this -> dispatcher -> dispatch ( Events :: USER_PROMOTED , $ event ) ; }
Promotes the given user.

@param string $username
Promotes the given user .