From 9d1a598ec0826b0e8c3b6fc0ff64863f5dde7edc Mon Sep 17 00:00:00 2001 From: Bharat Mediratta Date: Sat, 15 Nov 2008 08:15:00 +0000 Subject: Add support for modifying user data. It still needs work. Make the continue= param a GET only parameter so that it's not part of the form. --- modules/user/controllers/login.php | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'modules/user/controllers/login.php') diff --git a/modules/user/controllers/login.php b/modules/user/controllers/login.php index a0e9f403..586c9fa7 100644 --- a/modules/user/controllers/login.php +++ b/modules/user/controllers/login.php @@ -19,12 +19,11 @@ */ class Login_Controller extends Controller { public function index() { - $form = new Forge("login", "", "post", array("id" => "gLogin")); + $form = new Forge(url::current(true), "", "post", array("id" => "gLogin")); $group = $form->group(_("Login")); $group->input("name")->label(_("Name"))->id("gName")->class(null); $group->password("password")->label(_("Password"))->id("gPassword")->class(null); $group->submit(_("Login")); - $form->hidden("continue")->value($this->input->get("continue")); $group->inputs["name"]->error_messages("invalid_login", _("Invalid name or password")); if ($form->validate()) { @@ -32,9 +31,8 @@ class Login_Controller extends Controller { if ($user->loaded && user::is_correct_password($user, $group->password->value)) { user::login($user); - $continue = $form->hidden["continue"]->value; - if ($continue) { - url::redirect($form->hidden["continue"]->value); + if ($continue = $this->input->get("continue")) { + url::redirect($continue); } return; } else { -- cgit v1.2.3