Update ModelCustomerCreatedListener.php
This commit is contained in:
parent
7f1de122fe
commit
f5cb5e8263
1 changed files with 4 additions and 7 deletions
|
@ -58,16 +58,13 @@ class ModelCustomerCreatedListener
|
|||
$createLinuxWebUser->setPassword($password);
|
||||
$createLinuxWebUserOutput = $createLinuxWebUser->handle();
|
||||
|
||||
|
||||
dd($createLinuxWebUserOutput);
|
||||
|
||||
|
||||
$findCustomer->username = $generateUsername . $findCustomer->id;
|
||||
$findCustomer->save();
|
||||
if (strpos($createLinuxWebUserOutput, 'Creating home directory') !== false) {
|
||||
$findCustomer->username = $generateUsername . $findCustomer->id;
|
||||
$findCustomer->save();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
private static function _generateUsername($fullName)
|
||||
{
|
||||
$removedMultispace = preg_replace('/\s+/', ' ', $fullName);
|
||||
|
|
Loading…
Reference in a new issue