Skip to content

Commit

Permalink
build
Browse files Browse the repository at this point in the history
  • Loading branch information
mevdschee committed Aug 10, 2023
1 parent 3bcd7f8 commit 50bc0cb
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions api.include.php
Expand Up @@ -9988,7 +9988,7 @@ public function process(ServerRequestInterface $request, RequestHandlerInterface
'remember' => false,
]);
if ($user->ID) {
unset($user['user_pass']);
unset($user->data->user_pass);
return $this->responder->success($user);
}
return $this->responder->error(ErrorCode::AUTHENTICATION_FAILED, $username);
Expand All @@ -9997,15 +9997,15 @@ public function process(ServerRequestInterface $request, RequestHandlerInterface
if (is_user_logged_in()) {
wp_logout();
$user = wp_get_current_user();
unset($user['user_pass']);
unset($user->data->user_pass);
return $this->responder->success($user);
}
return $this->responder->error(ErrorCode::AUTHENTICATION_REQUIRED, '');
}
if ($method == 'GET' && $path == 'me') {
if (is_user_logged_in()) {
$user = wp_get_current_user();
unset($user['user_pass']);
unset($user->data->user_pass);
return $this->responder->success($user);
}
return $this->responder->error(ErrorCode::AUTHENTICATION_REQUIRED, '');
Expand Down
6 changes: 3 additions & 3 deletions api.php
Expand Up @@ -9988,7 +9988,7 @@ public function process(ServerRequestInterface $request, RequestHandlerInterface
'remember' => false,
]);
if ($user->ID) {
unset($user['user_pass']);
unset($user->data->user_pass);
return $this->responder->success($user);
}
return $this->responder->error(ErrorCode::AUTHENTICATION_FAILED, $username);
Expand All @@ -9997,15 +9997,15 @@ public function process(ServerRequestInterface $request, RequestHandlerInterface
if (is_user_logged_in()) {
wp_logout();
$user = wp_get_current_user();
unset($user['user_pass']);
unset($user->data->user_pass);
return $this->responder->success($user);
}
return $this->responder->error(ErrorCode::AUTHENTICATION_REQUIRED, '');
}
if ($method == 'GET' && $path == 'me') {
if (is_user_logged_in()) {
$user = wp_get_current_user();
unset($user['user_pass']);
unset($user->data->user_pass);
return $this->responder->success($user);
}
return $this->responder->error(ErrorCode::AUTHENTICATION_REQUIRED, '');
Expand Down

0 comments on commit 50bc0cb

Please sign in to comment.