From 872a4768ff166a173e4afd05efb9561fd3b06059 Mon Sep 17 00:00:00 2001 From: Reedy Date: Mon, 31 Oct 2016 14:17:27 +0000 Subject: [PATCH] Allow override of Site prefix without changing sitename Bug: T147901 Change-Id: Id5b565f9c05b591e3638dbf51dd784224203669c --- OATHUser.php | 5 ++++- extension.json | 3 ++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/OATHUser.php b/OATHUser.php index 9572a8b5..e5822c0e 100644 --- a/OATHUser.php +++ b/OATHUser.php @@ -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()}"; } diff --git a/extension.json b/extension.json index 3b9a7a1a..00d6a991 100644 --- a/extension.json +++ b/extension.json @@ -58,7 +58,8 @@ "config": { "OATHAuthWindowRadius": 4, "OATHAuthDatabase": false, - "OATHAuthSecret": false + "OATHAuthSecret": false, + "OATHAuthAccountPrefix": false }, "ResourceModules": { "ext.oathauth": {