Allow override of Site prefix without changing sitename

Bug: T147901
Change-Id: Id5b565f9c05b591e3638dbf51dd784224203669c
This commit is contained in:
Reedy 2016-10-31 14:17:27 +00:00
parent 56523b60cc
commit 872a4768ff
2 changed files with 6 additions and 2 deletions

View file

@ -32,8 +32,11 @@ class OATHUser {
* @return String
*/
public function getAccount() {
global $wgSitename;
global $wgSitename, $wgOATHAuthAccountPrefix;
if ( $wgOATHAuthAccountPrefix !== false ) {
return "$wgOATHAuthAccountPrefix:{$this->user->getName()}";
}
return "$wgSitename:{$this->user->getName()}";
}

View file

@ -58,7 +58,8 @@
"config": {
"OATHAuthWindowRadius": 4,
"OATHAuthDatabase": false,
"OATHAuthSecret": false
"OATHAuthSecret": false,
"OATHAuthAccountPrefix": false
},
"ResourceModules": {
"ext.oathauth": {