<?php
/***************************************************************************
- * Copyright (C) 2003-2009 Polytechnique.org *
+ * Copyright (C) 2003-2011 Polytechnique.org *
* http://opensource.polytechnique.org/ *
* *
* This program is free software; you can redistribute it and/or modify *
{
$res = XDB::query(
"SELECT COUNT(*)
- FROM openid_trusted
- WHERE (user_id = {?} OR user_id IS NULL) AND url = {?}",
+ FROM account_auth_openid
+ WHERE (uid = {?} OR uid IS NULL) AND url = {?}",
$user->id(), $this->request->trust_root);
return ($res->fetchOneCell() > 0);
}
$initial_trust = $this->IsEndpointTrusted($user);
if (!$initial_trust && $trusted && $permanent_trust) {
XDB::execute(
- "INSERT IGNORE INTO openid_trusted
- SET user_id = {?}, url = {?}",
+ "INSERT IGNORE INTO account_auth_openid
+ SET uid = {?}, url = {?}",
$user->id(), $this->request->trust_root);
}
// Renders the main XRDS page.
public function RenderMainXrdsPage(&$page)
{
- header('Content-type: application/xrds+xml');
+ pl_content_headers("application/xrds+xml");
$page->changeTpl('openid/idp_xrds.tpl', NO_SKIN);
$page->assign('type2', Auth_OpenID_TYPE_2_0_IDP);
$page->assign('sreg', Auth_OpenID_SREG_URI);
// Renders the XRDS page of |user|.
public function RenderUserXrdsPage(&$page, User &$user)
{
- header('Content-type: application/xrds+xml');
+ pl_content_headers("application/xrds+xml");
$page->changeTpl('openid/user_xrds.tpl', NO_SKIN);
$page->assign('type2', Auth_OpenID_TYPE_2_0);
$page->assign('type1', Auth_OpenID_TYPE_1_1);