mirror of
https://github.com/snipe/snipe-it.git
synced 2024-11-09 23:24:06 -08:00
Added lastname.firstname as email format
Signed-off-by: snipe <snipe@snipe.net>
This commit is contained in:
parent
f2e86b7d30
commit
bd1f43f9ee
|
@ -572,7 +572,6 @@ class User extends SnipeModel implements AuthenticatableContract, AuthorizableCo
|
|||
|
||||
if ($format=='firstname.lastname') {
|
||||
$username = str_slug($first_name) . '.' . str_slug($last_name);
|
||||
|
||||
} elseif ($format == 'lastnamefirstinitial') {
|
||||
$username = str_slug($last_name.substr($first_name, 0, 1));
|
||||
} elseif ($format == 'firstintial.lastname') {
|
||||
|
@ -589,7 +588,9 @@ class User extends SnipeModel implements AuthenticatableContract, AuthorizableCo
|
|||
$username = str_slug($first_name).str_slug($last_name);
|
||||
} elseif ($format == 'firstnamelastinitial') {
|
||||
$username = str_slug(($first_name.substr($last_name, 0, 1)));
|
||||
}
|
||||
} elseif ($format == 'lastname.firstname') {
|
||||
$username = str_slug($last_name).'.'.str_slug($first_name);
|
||||
}
|
||||
}
|
||||
|
||||
$user['first_name'] = $first_name;
|
||||
|
|
|
@ -134,6 +134,7 @@ return [
|
|||
'lastname_firstinitial' => 'Last Name First Initial (smith_j@example.com)',
|
||||
'firstinitial.lastname' => 'First Initial Last Name (j.smith@example.com)',
|
||||
'firstnamelastinitial' => 'First Name Last Initial (janes@example.com)',
|
||||
'lastnamefirstname' => 'Last Name First Name (smith.jane@example.com)',
|
||||
'first_name' => 'First Name',
|
||||
'first_name_format' => 'First Name (jane@example.com)',
|
||||
'files' => 'Files',
|
||||
|
|
|
@ -190,6 +190,7 @@ Form::macro('username_format', function ($name = 'username_format', $selected =
|
|||
'lastname_firstinitial' => trans('general.lastname_firstinitial'),
|
||||
'firstnamelastname' => trans('general.firstnamelastname'),
|
||||
'firstnamelastinitial' => trans('general.firstnamelastinitial'),
|
||||
'lastname.firstname' => trans('general.lastnamefirstname'),
|
||||
];
|
||||
|
||||
$select = '<select name="'.$name.'" class="'.$class.'" style="width: 100%" aria-label="'.$name.'">';
|
||||
|
|
Loading…
Reference in a new issue