Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public function changep()
- {
- if ($this->request->is('post')) {
- $id_user = $this->Auth->user('id');
- $user_change = $this->Users->get($id_user);
- $new_password = $this->request->data['new_password'];
- $user_change->password = $new_password;
- if($this->Users->save($user_update)){
- $this->Flash->success('La clave a sido cambiada con exito.');
- }
- else{
- $this->Flash->success('La clave no ha podido ser cambiada.');
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement