aboutsummaryrefslogtreecommitdiffstats
path: root/include/ws_functions.inc.php
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--include/ws_functions.inc.php19
1 files changed, 18 insertions, 1 deletions
diff --git a/include/ws_functions.inc.php b/include/ws_functions.inc.php
index b86fe6fd6..8faf96260 100644
--- a/include/ws_functions.inc.php
+++ b/include/ws_functions.inc.php
@@ -3561,7 +3561,24 @@ SELECT user_id, group_id
*/
function ws_users_add($params, &$service)
{
- $user_id = register_user($params['username'], $params['password'], $params['email'], false, $errors);
+ global $conf;
+
+ if ($conf['double_password_type_in_admin'])
+ {
+ if ($params['password'] != $params['password_confirm'])
+ {
+ return new PwgError(WS_ERR_INVALID_PARAM, l10n('The passwords do not match'));
+ }
+ }
+
+ $user_id = register_user(
+ $params['username'],
+ $params['password'],
+ $params['email'],
+ false, // notify admin
+ $errors,
+ $params['send_password_by_mail']
+ );
if (!$user_id)
{