diff options
author | Florian Pritz <bluewind@xinu.at> | 2013-07-14 16:49:47 +0200 |
---|---|---|
committer | Florian Pritz <bluewind@xinu.at> | 2013-07-14 16:49:47 +0200 |
commit | 7873bfbe586d73a0385b8b3c2c796d56a89e7031 (patch) | |
tree | dbc9d915079e3f173385a7469a2c667e9c886fa2 /application/controllers | |
parent | 572a5cbbbf5cc9b51f4ddffa08fe24badf9b711f (diff) |
Add sucess alert when saving profile
Signed-off-by: Florian Pritz <bluewind@xinu.at>
Diffstat (limited to 'application/controllers')
-rw-r--r-- | application/controllers/user.php | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/application/controllers/user.php b/application/controllers/user.php index 42f9e35ae..f52e9c0b1 100644 --- a/application/controllers/user.php +++ b/application/controllers/user.php @@ -321,6 +321,10 @@ class User extends CI_Controller { { $this->muser->require_access(); + if ($this->input->post("process") !== false) { + $this->_save_profile(); + } + $this->data["profile_data"] = $this->muser->get_profile_data(); $this->load->view('header', $this->data); @@ -328,7 +332,7 @@ class User extends CI_Controller { $this->load->view('footer', $this->data); } - function save_profile() + private function _save_profile() { $this->muser->require_access(); @@ -373,7 +377,12 @@ class User extends CI_Controller { $this->muser->update_profile($data); } - redirect("user/profile"); + $this->data["alerts"][] = array( + "type" => "success", + "message" => "Changes saved", + ); + + return true; } function logout() |