Enable login by role both on frontend and backend

This commit is contained in:
Almira Krdzic
2018-10-22 09:47:48 +02:00
parent 87f408125d
commit 21fafc5a43
20 changed files with 618 additions and 367 deletions

View File

@@ -58,6 +58,10 @@ class Wiaas_User {
* @return mixed
*/
public static function transform_jwt_token_response($data, $user) {
if (is_wp_error($data)) {
return $data;
}
return new WP_REST_Response(array(
'token' => $data['token'],
'userInfo' => array(