diff --git a/api.include.php b/api.include.php index 089890cc..0256b370 100644 --- a/api.include.php +++ b/api.include.php @@ -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); @@ -9997,7 +9997,7 @@ 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, ''); @@ -10005,7 +10005,7 @@ public function process(ServerRequestInterface $request, RequestHandlerInterface 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, ''); diff --git a/api.php b/api.php index 5dca13a5..cb6b92cb 100644 --- a/api.php +++ b/api.php @@ -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); @@ -9997,7 +9997,7 @@ 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, ''); @@ -10005,7 +10005,7 @@ public function process(ServerRequestInterface $request, RequestHandlerInterface 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, '');