diff options
Diffstat (limited to 'modules')
-rw-r--r-- | modules/user.module | 16 | ||||
-rw-r--r-- | modules/user/user.module | 16 |
2 files changed, 6 insertions, 26 deletions
diff --git a/modules/user.module b/modules/user.module index f26e90a63..f61a7e4a7 100644 --- a/modules/user.module +++ b/modules/user.module @@ -938,7 +938,7 @@ function user_register($edit = array()) { } if ($edit) { - _user_validate($edit, NULL, 'account'); + user_module_invoke('validate', $edit, $edit, 'account'); if (!form_has_errors()) { $from = variable_get('site_mail', ini_get('sendmail_from')); @@ -1076,7 +1076,7 @@ function user_edit($category = 'account') { $edit = $_POST['op'] ? $_POST['edit'] : object2array($account); if ($_POST['op'] == t('Save account')) { - _user_validate($edit, $account, $category); + user_module_invoke('validate', $edit, $account, $category); if (!form_has_errors()) { // Validate input to ensure that non-privileged users can't alter protected data. @@ -1266,7 +1266,7 @@ function user_configure_settings() { function user_admin_create($edit = array()) { if ($edit) { - _user_validate($edit, NULL, 'account'); + user_module_invoke('validate', $edit, $edit, 'account'); if (!form_has_errors()) { watchdog('user', 'new user: "'. $edit['name'] .'" <'. $edit['mail'] .'>'); @@ -1682,14 +1682,4 @@ function _user_forms(&$edit, $account, $category) { return $output; } -/** - * Validate the user data for the specified category. - */ -function _user_validate(&$edit, $account, $category) { - foreach (module_list() as $module) { - module_invoke($module, 'user', 'validate', $edit, $account, $category); - } -} - - ?> diff --git a/modules/user/user.module b/modules/user/user.module index f26e90a63..f61a7e4a7 100644 --- a/modules/user/user.module +++ b/modules/user/user.module @@ -938,7 +938,7 @@ function user_register($edit = array()) { } if ($edit) { - _user_validate($edit, NULL, 'account'); + user_module_invoke('validate', $edit, $edit, 'account'); if (!form_has_errors()) { $from = variable_get('site_mail', ini_get('sendmail_from')); @@ -1076,7 +1076,7 @@ function user_edit($category = 'account') { $edit = $_POST['op'] ? $_POST['edit'] : object2array($account); if ($_POST['op'] == t('Save account')) { - _user_validate($edit, $account, $category); + user_module_invoke('validate', $edit, $account, $category); if (!form_has_errors()) { // Validate input to ensure that non-privileged users can't alter protected data. @@ -1266,7 +1266,7 @@ function user_configure_settings() { function user_admin_create($edit = array()) { if ($edit) { - _user_validate($edit, NULL, 'account'); + user_module_invoke('validate', $edit, $edit, 'account'); if (!form_has_errors()) { watchdog('user', 'new user: "'. $edit['name'] .'" <'. $edit['mail'] .'>'); @@ -1682,14 +1682,4 @@ function _user_forms(&$edit, $account, $category) { return $output; } -/** - * Validate the user data for the specified category. - */ -function _user_validate(&$edit, $account, $category) { - foreach (module_list() as $module) { - module_invoke($module, 'user', 'validate', $edit, $account, $category); - } -} - - ?> |