function plugin_livedoor_action() { global $vars, $auth_api, $_livedoor_msg; if (!$auth_api['livedoor']['use']) { return ''; } // LOGIN if (isset($vars['login'])) { Utility::redirect(plugin_livedoor_jump_url()); } $obj = new auth_livedoor(); // LOGOUT if (isset($vars['logout'])) { $obj->unsetSession(); $page = empty($vars['page']) ? '' : decode($vars['page']); Utility::redirect(get_page_location_uri($page)); } // AUTH $rc = $obj->auth($vars); if (!isset($rc['has_error']) || $rc['has_error'] == 'true') { // ERROR $body = isset($rc['message']) ? $rc['message'] : 'unknown error.'; $die_message($body); } $obj->setSession(); Utility::redirect(get_page_location_uri($obj->get_return_page())); }
function plugin_livedoor_action() { global $vars, $auth_api, $_livedoor_msg; if (!$auth_api['livedoor']['use']) { return ''; } if (!function_exists('pkwk_session_start')) { return ''; } if (pkwk_session_start() == 0) { return ''; } $die_message = PLUS_PROTECT_MODE ? 'die_msg' : 'die_message'; // LOGIN if (isset($vars['login'])) { header('Location: ' . plugin_livedoor_jump_url()); die; } $obj = new auth_livedoor(); // LOGOUT if (isset($vars['logout'])) { $obj->auth_session_unset(); $page = empty($vars['page']) ? '' : decode($vars['page']); header('Location: ' . get_page_location_uri($page)); die; } // AUTH $rc = $obj->auth($vars); if (!isset($rc['has_error']) || $rc['has_error'] == 'true') { // ERROR $body = isset($rc['message']) ? $rc['message'] : 'unknown error.'; $die_message($body); } $obj->auth_session_put(); header('Location: ' . get_page_location_uri($obj->get_return_page())); die; }