diff options
author | Tim Almdal <tnalmdal@shaw.ca> | 2009-03-25 16:21:36 +0000 |
---|---|---|
committer | Tim Almdal <tnalmdal@shaw.ca> | 2009-03-25 16:21:36 +0000 |
commit | 3cb2c42e49b008facff1563b0e9b1d5b5c67e77c (patch) | |
tree | 861ec26774766776ef71be0c572fe99da2219440 /modules | |
parent | 961d5e11cf844e412bfcd8baa0e2d776e0ec2bb6 (diff) |
Fix for ticket #181. Valiant take note of the change to
admin_users.php. I had to remove the check for the locale as it
hasn't been added to the form.
Diffstat (limited to 'modules')
-rw-r--r-- | modules/user/controllers/admin_users.php | 6 | ||||
-rw-r--r-- | modules/user/helpers/user.php | 2 |
2 files changed, 5 insertions, 3 deletions
diff --git a/modules/user/controllers/admin_users.php b/modules/user/controllers/admin_users.php index 14c4c593..4f3ea65a 100644 --- a/modules/user/controllers/admin_users.php +++ b/modules/user/controllers/admin_users.php @@ -41,8 +41,10 @@ class Admin_Users_Controller extends Controller { $user = user::create( $name, $form->add_user->full_name->value, $form->add_user->password->value); $user->email = $form->add_user->email->value; - $desired_locale = $form->add_user->locale->value; - $user->locale = $desired_locale == "none" ? null : $desired_locale; + + // @todo Add locale to the user add form + $user->locale = null; + $user->save(); message::success(t("Created user %user_name", array("user_name" => $user->name))); print json_encode(array("result" => "success")); diff --git a/modules/user/helpers/user.php b/modules/user/helpers/user.php index 6dc2567b..d08ad1bd 100644 --- a/modules/user/helpers/user.php +++ b/modules/user/helpers/user.php @@ -70,7 +70,7 @@ class user_Core { $group->password("password2")->label(t("Confirm Password"))->id("gPassword2") ->matches($group->password); $group->input("email")->label(t("Email"))->id("gEmail"); - $group->input("url")->label(t("URL"))->id("gUrl")->value($user->url); + $group->input("url")->label(t("URL"))->id("gUrl"); self::_add_locale_dropdown($group); $group->submit("")->value(t("Add User")); $user = ORM::factory("user"); |