Mercurial > hg > fapweb
diff msite.inc.php @ 1089:00632d30bafe
Implement new settings for making user/votekeys case-insensitive and
setting the array of characters used for generating keys in the config.
author | Matti Hamalainen <ccr@tnsp.org> |
---|---|
date | Thu, 26 Jan 2017 01:27:32 +0200 |
parents | 7da8bde9b7be |
children | 95b74632cfe2 |
line wrap: on
line diff
--- a/msite.inc.php Thu Jan 26 00:48:34 2017 +0200 +++ b/msite.inc.php Thu Jan 26 01:27:32 2017 +0200 @@ -557,7 +557,15 @@ function stGenerateUserKey() { global $db; + + // Default keychars $keyChars = "abdefghjkmnpqrstwxyzABCDEFGHJKLMNPQRSTUVWXYZ23456789"; + + if (($tmp = stGetSetting("userKeyChars", NULL)) !== NULL) + $keyChars = $tmp; + + if (($tmp = stGetSetting("userKeyCase", NULL)) !== NULL) + $keyChars = strtoupper($keyChars); while (TRUE) {