We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent de205bc commit 402025eCopy full SHA for 402025e
main/inc/lib/webservices/Rest.php
@@ -1896,6 +1896,16 @@ public function addUser($userParam): array
1896
$expiration_date = $userParam['expiration_date'];
1897
}
1898
1899
+ // If check_email_duplicates was set, trigger exception (i.e. do not create) if the e-mail is already used
1900
+ if ($userParam['check_email_duplicates']) {
1901
+ if (!empty($email)) {
1902
+ $userFromEmail = api_get_user_info_from_email($email);
1903
+ if (!empty($userFromEmail)) {
1904
+ throw new Exception(get_lang('EmailUsedTwice'));
1905
+ }
1906
1907
1908
+
1909
// Default language.
1910
if (empty($language)) {
1911
$language = api_get_setting('platformLanguage');
0 commit comments