Browse files

Added option to signon module to check username uniqueness.

All tested OK

#fixes 72
  • Loading branch information...
M4LuZ authored and andygrunwald committed Sep 22, 2018
1 parent 6f88c92 commit 12ae141e96f32fb7384c10e5b80054564f064a82
@@ -192,7 +192,7 @@
@@ -73,7 +73,7 @@ function CheckValidEmail($email)
// Check if we already have a user with that email address
$row = $db->qry_first('SELECT * FROM %prefix%users WHERE email = %string%', $email);
$row = $db->qry_first('SELECT * FROM %prefix%user WHERE email = %string%', $email);
if ($row){
return t('Diese E-Mail-Adresse ist bereits in Verwendung. Bitte verwende die "Passwort zurücksetzen"-Funktion, um dein Passwort zurück zu setzen');
@@ -39,6 +39,12 @@
<name>Felder bei Anmeldung</name>
<description>Soll der Username einmalig sein?</description>

This file was deleted.

Oops, something went wrong.
@@ -0,0 +1,17 @@
* Checks (at the moment only) if the selected username is already existing in the database
* @param string $username The username to be checked
* @return bool|mixed|string
function CheckValidUsername($username){
global $cfg, $db;
if ($cfg['signon_username_unique']){
$row = $db->qry_first('SELECT * FROM %prefix%user WHERE username=%string%', $username);
if ($row){
return t('Der gewählte Username existiert bereits');
return false;

0 comments on commit 12ae141

Please sign in to comment.