aboutsummaryrefslogtreecommitdiffstats
path: root/includes/password/PasswordFactory.php
diff options
context:
space:
mode:
authorMarius Hoch <hoo@online.de>2014-10-20 00:22:02 +0200
committerMarius Hoch <hoo@online.de>2014-10-20 02:03:08 +0200
commitee9166a10e9d6c90a31b7ae76bd2755a2004643c (patch)
tree80809a07c9179e885e1b058467b7e0542dba3673 /includes/password/PasswordFactory.php
parent5aa4042bd20502953e98f58161d5d241e06e10e8 (diff)
downloadmediawikicore-ee9166a10e9d6c90a31b7ae76bd2755a2004643c.tar.gz
mediawikicore-ee9166a10e9d6c90a31b7ae76bd2755a2004643c.zip
Make TestUser way faster
By only updating the user row in the database, if needed and by making use of md5 for passwords instead of slower hashing. This cut down run time of some Wikibase API tests to 20% of the original value for me! Also it reduces the run time of MediaWiki's test suite by about 45s on jenkins. Change-Id: I7024b287a71fe9b327dbcdc5427cd8edb5047606
Diffstat (limited to 'includes/password/PasswordFactory.php')
-rw-r--r--includes/password/PasswordFactory.php9
1 files changed, 9 insertions, 0 deletions
diff --git a/includes/password/PasswordFactory.php b/includes/password/PasswordFactory.php
index 48d6866926bc..86a3fefd5887 100644
--- a/includes/password/PasswordFactory.php
+++ b/includes/password/PasswordFactory.php
@@ -69,6 +69,15 @@ final class PasswordFactory {
}
/**
+ * Get the default password type
+ *
+ * @return string
+ */
+ public function getDefaultType() {
+ return $this->default;
+ }
+
+ /**
* Initialize the internal static variables using the global variables
*
* @param Config $config Configuration object to load data from