function plugin_auth_mixi_inline() { global $vars, $auth_api, $_auth_mixi_msg; if (!isset($auth_api['openid']['use'])) { return ''; } if (!$auth_api['openid']['use']) { return $_auth_mixi_msg['msg_invalid']; } if (!PLUGIN_AUTH_MIXI_USE_AGREEMENT) { return $_auth_mixi_msg['msg_agreement']; } $argv = func_get_args(); $parm = auth_mixi_set_parm($argv); exist_plugin('openid'); list($idp, $icon_botton, $icon_mini) = auth_mixi_set_loginuri($parm['type'], $parm['icon'], $parm['id']); // 認証済みの扱い $icon = '<img src="' . IMAGE_URI . 'plus/openid/mixi/icon.gif"' . ' width="16" height="16" alt="mixi" title="mixi" />'; $msg = plugin_openid_logoff_msg('auth_mixi', $icon); if ($msg === false) { return ''; } // 他認証 if (!empty($msg)) { return $msg; } // 未認証時の扱い $page = empty($vars['page']) ? '' : $vars['page']; if ($parm['type'] == 'friends' && empty($parm['id'])) { $redirect_url = get_cmd_uri('auth_mixi', $page); } else { $redirect_url = get_cmd_uri('openid', $page, '', array('action' => 'verify', 'openid_url' => $idp, 'author' => 'auth_mixi')); } return '<a href="' . $redirect_url . '">' . $icon_botton . '</a>'; }
function plugin_openid_convert() { global $vars, $auth_api, $_openid_msg; if (!isset($auth_api['openid']['use'])) { return ''; } if (!$auth_api['openid']['use']) { return '<p>' . $_openid_msg['msg_invalid'] . '</p>'; } $label = 'OpenID:'; $logout = $_openid_msg['msg_logout']; $msg = plugin_openid_logoff_msg(); if ($msg === false) { return ''; } // 他認証 if (!empty($msg)) { return $msg; } // ログオン済 return plugin_openid_login_form(); }