This commit is contained in:
Martin Müller 2014-05-11 15:40:33 +02:00
parent 9e1df8a6d6
commit b791d541a6
2 changed files with 2 additions and 2 deletions

View File

@ -161,6 +161,7 @@ class RegistrationController extends AppController {
if ($result) { if ($result) {
$this->MiconwareSession->setFlash(__('dreamjob.password_reset.send'), 'flash', array('alert' => 'success')); $this->MiconwareSession->setFlash(__('dreamjob.password_reset.send'), 'flash', array('alert' => 'success'));
return $this->redirect(array('controller'=>'home','action' => 'home'));
} else { } else {
$this->MiconwareSession->setFlash(__('dreamjob.password_reset.send.error'), 'flash', array('alert' => 'danger')); $this->MiconwareSession->setFlash(__('dreamjob.password_reset.send.error'), 'flash', array('alert' => 'danger'));
} }
@ -185,10 +186,10 @@ class RegistrationController extends AppController {
if (!$send and $this->request->is('post')) { if (!$send and $this->request->is('post')) {
if ($this->request->data['User']['password1'] == $this->request->data['User']['password2']) { if ($this->request->data['User']['password1'] == $this->request->data['User']['password2']) {
$password = $this->MiconwareSession->create_hash($this->request->data['User']['password1']); $password = $this->MiconwareSession->create_hash($this->request->data['User']['password1']);
var_dump($password);
$result = $this->User->replace_password($try,$password); $result = $this->User->replace_password($try,$password);
if ($result) { if ($result) {
$this->MiconwareSession->setFlash(__('dreamjob.password_replace.done'), 'flash', array('alert' => 'success')); $this->MiconwareSession->setFlash(__('dreamjob.password_replace.done'), 'flash', array('alert' => 'success'));
return $this->redirect(array('controller'=>'home','action' => 'home'));
} else { } else {
$this->MiconwareSession->setFlash(__('dreamjob.password_replace.error'), 'flash', array('alert' => 'danger')); $this->MiconwareSession->setFlash(__('dreamjob.password_replace.error'), 'flash', array('alert' => 'danger'));
} }

View File

@ -181,7 +181,6 @@ class SearchController extends AppController {
$c[] = $b['DreamjobISearch']['worker_id']; $c[] = $b['DreamjobISearch']['worker_id'];
$con['DreamjobWorker.djaccount_ptr_id'] =$c; $con['DreamjobWorker.djaccount_ptr_id'] =$c;
} }
var_dump($con);
$workers = $this->DreamjobWorker->find('all', array('conditions' => $con)); $workers = $this->DreamjobWorker->find('all', array('conditions' => $con));
$this->set("workers", $workers); $this->set("workers", $workers);