|
@@ 381-383 (lines=3) @@
|
| 378 |
|
throw new InvalidArgumentValue('login', $userCreateStruct->login, 'UserCreateStruct'); |
| 379 |
|
} |
| 380 |
|
|
| 381 |
|
if (!is_string($userCreateStruct->email) || empty($userCreateStruct->email)) { |
| 382 |
|
throw new InvalidArgumentValue('email', $userCreateStruct->email, 'UserCreateStruct'); |
| 383 |
|
} |
| 384 |
|
|
| 385 |
|
if (!preg_match('/^.+@.+\..+$/', $userCreateStruct->email)) { |
| 386 |
|
throw new InvalidArgumentValue('email', $userCreateStruct->email, 'UserCreateStruct'); |
|
@@ 735-737 (lines=3) @@
|
| 732 |
|
} |
| 733 |
|
|
| 734 |
|
if ($userUpdateStruct->email !== null) { |
| 735 |
|
if (!is_string($userUpdateStruct->email) || empty($userUpdateStruct->email)) { |
| 736 |
|
throw new InvalidArgumentValue('email', $userUpdateStruct->email, 'UserUpdateStruct'); |
| 737 |
|
} |
| 738 |
|
|
| 739 |
|
if (!preg_match('/^.+@.+\..+$/', $userUpdateStruct->email)) { |
| 740 |
|
throw new InvalidArgumentValue('email', $userUpdateStruct->email, 'UserUpdateStruct'); |
|
@@ 744-746 (lines=3) @@
|
| 741 |
|
} |
| 742 |
|
} |
| 743 |
|
|
| 744 |
|
if ($userUpdateStruct->password !== null && (!is_string($userUpdateStruct->password) || empty($userUpdateStruct->password))) { |
| 745 |
|
throw new InvalidArgumentValue('password', $userUpdateStruct->password, 'UserUpdateStruct'); |
| 746 |
|
} |
| 747 |
|
|
| 748 |
|
if ($userUpdateStruct->enabled !== null && !is_bool($userUpdateStruct->enabled)) { |
| 749 |
|
throw new InvalidArgumentValue('enabled', $userUpdateStruct->enabled, 'UserUpdateStruct'); |