Example #1
0
 /**
  * Redirect user to OpenID Identity URL
  * using only from xoops userinfo page
  */
 function redirectAction()
 {
     require_once XOOPS_ROOT_PATH . '/modules/openid/class/context.php';
     $request = new Openid_Context();
     if (!$request->accept('id', 'int', 'get') || !$request->accept('displayid', 'string', 'get', 'to')) {
         exit;
     }
     if ($record =& $this->_handler->get($request->get('id'))) {
         $displayid = $record->get('displayid');
         if ($request->get('displayid') == $displayid) {
             if (strpos($displayid, 'http') === 0) {
                 header('Location: ' . $displayid);
                 //control codes are already removed.
             } else {
                 header('Location: http://xri.net/' . rawurlencode($displayid));
             }
         }
     }
 }