有没有办法只允许通过 facebook 扩展在 mediawiki 上创建新帐户?即,我想通过 Special:UserLogin/signup 禁用常规帐户创建(除非由管理员完成),同时仍允许 facebook 扩展程序根据需要自动创建新帐户。
到目前为止,我所做的一切都完全阻止了所有情况下的帐户创建(系统操作员除外)。具体来说,当我通过 wgGroupPermissions 禁用常规帐户创建时,如下所示:
$wgGroupPermissions['*']['createaccount'] = false;
然后 facebook 扩展抛出以下错误:
Non-string key given
Backtrace:
#0 /var/www-wiki.kostumekult.com/html/includes/GlobalFunctions.php(1183): MessageCache->get(Array, true, false)
#1 /var/www-wiki.kostumekult.com/html/includes/GlobalFunctions.php(1163): wfMsgGetKey(Array, true, false, true)
#2 /var/www-wiki.kostumekult.com/html/includes/GlobalFunctions.php(1081): wfMsgReal(Array, Array)
#3 /var/www-wiki.kostumekult.com/html/extensions/Facebook/FacebookUser.php(41): wfMsg(Array)
#4 /var/www-wiki.kostumekult.com/html/extensions/Facebook/FacebookUser.php(327): FacebookUserException->__construct(Array, 'createaccount')
#5 /var/www-wiki.kostumekult.com/html/extensions/Facebook/SpecialConnect.php(235): FacebookUser->createUser('rommel.hoop.1', '')
#6 /var/www-wiki.kostumekult.com/html/includes/SpecialPageFactory.php(458): SpecialConnect->execute('ChooseName')
#7 /var/www-wiki.kostumekult.com/html/includes/Wiki.php(240): SpecialPageFactory::executePath(Object(Title), Object(RequestContext))
#8 /var/www-wiki.kostumekult.com/html/includes/Wiki.php(640): MediaWiki->performRequest()
#9 /var/www-wiki.kostumekult.com/html/includes/Wiki.php(547): MediaWiki->main()
#10 /var/www-wiki.kostumekult.com/html/index.php(57): MediaWiki->run()
#11 {main}