public function execute() { $dbr = wfGetDB( DB_SLAVE ); if ( !$dbr->tableExists( 'user_properties' ) ) { $this->error( "The OpenID extension requires at least MediaWiki 1.16.", true ); } $this->output( "Checking for legacy user_property rows..." ); $dbr = wfGetDB( DB_SLAVE ); $res = $dbr->select( array( 'user_properties' ), array( 'up_user' ), array( 'up_property' => 'openid_url' ), __METHOD__ ); if ( $dbr->numRows( $res ) ) { foreach ( $res as $row ) { $user = User::newFromId( $row->up_user ); $this->output( "\n\tFixing {$user->getName()}" ); SpecialOpenID::addUserUrl( $user, $user->getOption( 'openid_url' ) ); } $this->output( "done\n" ); } else { $this->output( "none found\n" ); } }
private static function getInfoTable($user) { $urls = SpecialOpenID::getUserUrl($user); $delTitle = SpecialPage::getTitleFor('OpenIDConvert', 'Delete'); $sk = $user->getSkin(); $rows = ''; foreach ($urls as $url) { $rows .= Xml::tags('tr', array(), Xml::tags('td', array(), Xml::element('a', array('href' => $url), $url)) . Xml::tags('td', array(), $sk->makeLinkObj($delTitle, wfMsg('openid-urls-delete'), wfArrayToCgi(array('url' => $url))))) . "\n"; } $info = Xml::tags('table', array('class' => 'wikitable'), Xml::tags('tr', array(), Xml::element('th', array(), wfMsg('openid-urls-url')) . Xml::element('th', array(), wfMsg('openid-urls-action'))) . "\n" . $rows); $info .= $user->getSkin()->makeLinkObj(SpecialPage::getTitleFor('OpenIDConvert'), wfMsgHtml('openid-add-url')); return $info; }
function __construct() { parent::__construct( 'OpenIDLogin' ); }
function __construct() { parent::__construct( "OpenIDServer", '', false ); }
private static function getInfoTable( $user ) { global $wgLang; $openid_urls_registration = SpecialOpenID::getUserOpenIDInformation( $user ); $delTitle = SpecialPage::getTitleFor( 'OpenIDConvert', 'Delete' ); $sk = $user->getSkin(); $rows = ''; foreach ( $openid_urls_registration as $url_reg ) { if ( !empty( $url_reg->uoi_user_registration ) ) { $registrationTime = wfMsgExt( 'openid-urls-registration-date-time', 'parsemag', $wgLang->timeanddate( $url_reg->uoi_user_registration, true ), $wgLang->date( $url_reg->uoi_user_registration, true ), $wgLang->time( $url_reg->uoi_user_registration, true ) ); } else { $registrationTime = ''; } $rows .= Xml::tags( 'tr', array(), Xml::tags( 'td', array(), Xml::element( 'a', array( 'href' => $url_reg->uoi_openid ), $url_reg->uoi_openid ) ) . Xml::tags( 'td', array(), $registrationTime ) . Xml::tags( 'td', array(), $sk->link( $delTitle, wfMsgHtml( 'openid-urls-delete' ), array(), array( 'url' => $url_reg->uoi_openid ) ) ) ) . "\n"; } $info = Xml::tags( 'table', array( 'class' => 'wikitable' ), Xml::tags( 'tr', array(), Xml::element( 'th', array(), wfMsg( 'openid-urls-url' ) ) . Xml::element( 'th', array(), wfMsg( 'openid-urls-registration' ) ) . Xml::element( 'th', array(), wfMsg( 'openid-urls-action' ) ) ) . "\n" . $rows ); $info .= $sk->link( SpecialPage::getTitleFor( 'OpenIDConvert' ), wfMsgHtml( 'openid-add-url' ) ); return $info; }
static function OpenIDToUrl($openid) { /* ID is either an URL already or an i-name */ if (Auth_Yadis_identifierScheme($openid) == 'XRI') { return SpecialOpenID::xriToUrl($openid); } else { return $openid; } }
function __construct() { parent::__construct( 'OpenIDConvert', 'openid-converter-access' ); }
function __construct() { parent::__construct( 'OpenIDXRDS', '', false ); }