deleteUser() public method

public deleteUser ( integer $userId ) : boolean
$userId integer
return boolean
Example #1
0
 /**
  * @param string $userId
  * @route crew/users/edit/{id}
  */
 public function deleteUser(string $userId = '')
 {
     $userId = (int) $userId;
     $user = $this->account->getUserAccount($userId, true);
     $post = $this->post(new DeleteUserFilter());
     if ($post) {
         if ($this->account->deleteUser($userId)) {
             \Airship\redirect($this->airship_cabin_prefix . '/crew/users');
         }
     }
     $this->lens('crew/user_delete', ['active_link' => 'bridge-link-admin-crew-users', 'user' => $user]);
 }