'openid/trust' => $this->make_hook('trust', AUTH_COOKIE),
'openid/idp_xrds' => $this->make_hook('idp_xrds', AUTH_PUBLIC),
'openid/user_xrds' => $this->make_hook('user_xrds', AUTH_PUBLIC),
-// 'openid/melix' => $this->make_hook('melix', AUTH_PUBLIC),
+ 'openid/melix' => $this->make_hook('melix', AUTH_PUBLIC),
);
}
// This will redirect to the canonic URL, which was not used
// if this hook was triggered
- return render_discovery_page(&$page, $user);
+ return $this->render_discovery_page(&$page, $user);
}
//--------------------------------------------------------------------//
// TODO such a function should probably be provided in the User class
// or at least not here
$res = XDB::query('SELECT u.user_id
- FROM auth_user_md5 AS u
- INNER JOIN aliases AS a ON (a.id = u.user_id AND type != \'homonyme\')
- WHERE a.alias = {?} AND u.perms IN(\'admin\', \'user\')',
+ FROM auth_user_md5 AS u
+ INNER JOIN auth_user_quick AS q USING(user_id)
+ INNER JOIN aliases AS a ON (a.id = u.user_id AND type != \'homonyme\')
+ WHERE u.perms IN(\'admin\', \'user\')
+ AND q.emails_alias_pub = \'public\'
+ AND a.alias = {?}',
$x);
if (list($uid) = $res->fetchOneRow()) {
$user = User::getSilent($uid);