1
0
mirror of https://github.com/typemill/typemill.git synced 2025-08-09 23:58:08 +02:00

Merge branch 'version143' into develop

This commit is contained in:
trendschau
2021-01-05 21:17:45 +01:00
3 changed files with 14 additions and 4 deletions

View File

@@ -58,8 +58,9 @@ class Validation
# checks if username is free when create new user
Validator::addRule('userAvailable', function($field, $value, array $params, array $fields) use ($user)
{
$userdata = $user->getUser($value);
if($userdata){ return false; }
$activeUser = $user->getUser($value);
$inactiveUser = $user->getUser("_" . $value);
if($activeUser OR $inactiveUser){ return false; }
return true;
}, 'taken');