Revert "Use an event 'check_user_name_exists' to validate the input name is already in use. The parameter is a standard class with the name and an exists flag. Any event handler should or their result with the exists flag."

This reverts commit 04bf50bfb4.
This commit is contained in:
Tim Almdal
2009-10-31 16:16:47 -07:00
parent c3dcfd136b
commit 1c428df9e0
2 changed files with 1 additions and 8 deletions

View File

@@ -36,9 +36,7 @@ class Admin_Users_Controller extends Admin_Controller {
$form = $this->_get_user_add_form_admin();
$valid = $form->validate();
$name = $form->add_user->inputs["name"]->value;
$user_exists_data = (object)array("name" => $name);
module::event("check_username_exists", $user_exists_data);
if ($user_exists_data->exists) {
if ($user = user::lookup_by_name($name)) {
$form->add_user->inputs["name"]->add_error("in_use", 1);
$valid = false;
}