예제 #1
0
 public function check($username = null, $email = null)
 {
     $view = View::create()->setStatusCode(Codes::HTTP_NO_CONTENT);
     if ($username) {
         $usernameCheck = $this->userManager->findUserByUsername($username);
         $view->setHeader('X-Can-Use-Username', $usernameCheck ? 'no' : 'yes');
     }
     if ($email) {
         $emailCheck = $this->userManager->findUserByEmail($email);
         $view->setHeader('X-Can-Use-Email', $emailCheck ? 'no' : 'yes');
     }
     return $view;
 }
 public function delete($username)
 {
     $this->userManager->delete($username);
     return View::create(null, Codes::HTTP_NO_CONTENT);
 }