Skip to content

Instantly share code, notes, and snippets.

@mtszpater
Created June 11, 2017 09:28
Show Gist options
  • Save mtszpater/3906331616aeb9978757c06b558af4cf to your computer and use it in GitHub Desktop.
Save mtszpater/3906331616aeb9978757c06b558af4cf to your computer and use it in GitHub Desktop.
private function user() {
if (!$this->userService->isAdmin()) {
$this->status = StatusHandler::error(StatusHandler::NOT_ADMIN);
return;
}
if ($this->userService->registerUser($this->args['newlogin'], $this->args['newpassword'])) {
$this->status = StatusHandler::success();
}
else {
$this->status = StatusHandler::error(StatusHandler::STH_WRONG);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment