From 3cb2c42e49b008facff1563b0e9b1d5b5c67e77c Mon Sep 17 00:00:00 2001 From: Tim Almdal Date: Wed, 25 Mar 2009 16:21:36 +0000 Subject: 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. --- modules/user/controllers/admin_users.php | 6 ++++-- modules/user/helpers/user.php | 2 +- 2 files changed, 5 insertions(+), 3 deletions(-) (limited to 'modules') 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"); -- cgit v1.2.3