diff options
author | Andy Staudacher <andy.st@gmail.com> | 2008-12-30 21:20:16 +0000 |
---|---|---|
committer | Andy Staudacher <andy.st@gmail.com> | 2008-12-30 21:20:16 +0000 |
commit | 59e5ddc13fa21be1f5062db7a81a8cc9c256014f (patch) | |
tree | 3ffa269b6ff6d54f8b7c9e6f568c75900608d894 /core | |
parent | 1cacf769d1a474dd946a1c89b7268f8feeecc566 (diff) |
Update user::create() scaffolding for changes in the user module: can't set the isAdmin bit at creation time.
Diffstat (limited to 'core')
-rw-r--r-- | core/controllers/welcome.php | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/core/controllers/welcome.php b/core/controllers/welcome.php index 867280fe..b83ea40d 100644 --- a/core/controllers/welcome.php +++ b/core/controllers/welcome.php @@ -460,8 +460,12 @@ class Welcome_Controller extends Template_Controller { public function add_user() { $name = $this->input->post("user_name"); - $admin = (bool)$this->input->post("admin"); - user::create($name, $name, $name, $admin); + $isAdmin = (bool)$this->input->post("admin"); + $user = user::create($name, $name, $name); + if ($isAdmin) { + $user->admin = true; + $user->save(); + } url::redirect("welcome"); } |