diff options
author | Florian Pritz <bluewind@xinu.at> | 2016-07-14 15:18:23 +0200 |
---|---|---|
committer | Florian Pritz <bluewind@xinu.at> | 2016-07-14 15:20:44 +0200 |
commit | 4a3e17f0c20356b0690bbb52285fe18d4c1a89ae (patch) | |
tree | 7ea41c1f95ded107a4856373fa360e8cca94873d /application/controllers/user.php | |
parent | 3917a0cb9e284cc423b110901e165de6a0cfa5da (diff) |
muser: Add add_user function
Signed-off-by: Florian Pritz <bluewind@xinu.at>
Diffstat (limited to 'application/controllers/user.php')
-rw-r--r-- | application/controllers/user.php | 16 |
1 files changed, 2 insertions, 14 deletions
diff --git a/application/controllers/user.php b/application/controllers/user.php index 21d5d21f5..ab411d7d2 100644 --- a/application/controllers/user.php +++ b/application/controllers/user.php @@ -217,13 +217,7 @@ class User extends MY_Controller { } if (empty($error)) { - $this->db->set(array( - 'username' => $username, - 'password' => $this->muser->hash_password($password), - 'email' => $email, - 'referrer' => $referrer - )) - ->insert('users'); + $this->muser->add_user($username, $password, $email, $referrer); $this->db->where('key', $key) ->delete('actions'); @@ -649,13 +643,7 @@ class User extends MY_Controller { return true; }); - $this->db->set(array( - 'username' => $username, - 'password' => $this->muser->hash_password($password), - 'email' => $email, - 'referrer' => NULL - )) - ->insert('users'); + $this->muser->add_user($username, $password, $email, NULL); echo "User added\n"; } |