'; _e('JSON API Auth requires the JSON API plugin to be activated. Please install / activate JSON API first.', 'json-api-user'); echo '

'; } function pimAuthJsonApiController($aControllers) { $aControllers[] = 'Auth'; return $aControllers; } function setAuthControllerPath($sDefaultPath) { return dirname(__FILE__) . '/controllers/Auth.php'; } function json_api_auth_checkAuthCookie($sDefaultPath) { global $json_api; if ($json_api->query->cookie) { $user_id = wp_validate_auth_cookie($json_api->query->cookie, 'logged_in'); if ($user_id) { $user = get_userdata($user_id); wp_set_current_user($user->ID, $user->user_login); } } }