Added first-initial dot lastname format for usernames/email

Fixed [ch1379]
This commit is contained in:
snipe
2019-04-02 18:21:54 -07:00
parent 37b8029d04
commit fe553aec02
3 changed files with 8 additions and 4 deletions
+3
View File
@@ -508,6 +508,9 @@ class User extends SnipeModel implements AuthenticatableContract, AuthorizableCo
} elseif ($format=='lastnamefirstinitial') {
$username = str_slug($last_name.substr($first_name, 0, 1));
} elseif ($format=='firstintial.lastname') {
$username = substr($first_name, 0, 1).'.'.str_slug($last_name);
} elseif ($format=='firstname_lastname') {
$username = str_slug($first_name).'_'.str_slug($last_name);