// OpenId form {{{
if (Post::has('del_openid')) {
- XDB::execute('DELETE FROM openid_trusted
+ XDB::execute('DELETE FROM account_auth_openid
WHERE id = {?}', Post::i('del_openid'));
}
// }}}
INNER JOIN profiles AS p ON (ap.pid = p.pid)
WHERE ap.uid = {?}', $user->id()));
$page->assign('openid', XDB::iterator('SELECT id, url
- FROM openid_trusted
- WHERE user_id = {?}', $user->id()));
+ FROM account_auth_openid
+ WHERE uid = {?}', $user->id()));
// Displays email redirection and the general profile.
if ($registered && $redirect) {
{
$page->setTitle('Sites tiers de confiance');
$page->assign('title', 'Mes sites tiers de confiance pour OpenId');
- $table_editor = new PLTableEditor('openid/trusted', 'openid_trusted', 'id');
- $table_editor->set_where_clause('user_id = ' . XDB::escape(S::user()->id()));
- $table_editor->vars['user_id']['display'] = false;
+ $table_editor = new PLTableEditor('openid/trusted', 'account_auth_openid', 'id');
+ $table_editor->set_where_clause(XDB::format('uid = {?}', S::user()->id()));
+ $table_editor->vars['uid']['display'] = false;
$table_editor->describe('url', 'site tiers', true);
$page->assign('deleteonly', true);
$table_editor->apply($page, $action, $id);
{
$page->setTitle('Sites tiers de confiance');
$page->assign('title', 'Sites tiers de confiance globaux pour OpenId');
- $table_editor = new PLTableEditor('admin/openid/trusted', 'openid_trusted', 'id');
- $table_editor->set_where_clause('user_id IS NULL');
- $table_editor->vars['user_id']['display'] = false;
+ $table_editor = new PLTableEditor('admin/openid/trusted', 'account_auth_openid', 'id');
+ $table_editor->set_where_clause('uid IS NULL');
+ $table_editor->vars['uid']['display'] = false;
$table_editor->describe('url', 'site tiers', true);
$page->assign('readonly', true);
$table_editor->apply($page, $action, $id);
{
$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);
}
ALTER TABLE profile_medals
CHANGE COLUMN uid pid INT(11) not null;
+# account
+ ALTER TABLE account_auth_openid
+CHANGE COLUMN user_id uid INT(11) not null;
+
# vim:set ft=mysql:
copyTable('#x4dat#.watch_nonins', 'watch_nonins');
copyTable('#x4dat#.watch_promo', 'watch_promo');
-copyTable('#x4dat#.openid_trusted', 'openid_trusted', false);
+copyTable('#x4dat#.openid_trusted', 'account_auth_openid', false);
// vim:set et sw=4 sts=4 sws=4 foldmethod=marker enc=utf-8:
?>