diff --git a/app/Controller/UserController.php b/app/Controller/UserController.php
index 7dc82cc..03a3598 100755
--- a/app/Controller/UserController.php
+++ b/app/Controller/UserController.php
@@ -10,7 +10,7 @@ class UserController extends AppController {
* @var array
*/
- public $uses = array('DreamjobListGraducation','DreamjobWorker','DreamjobCompany','DreamjobPageText','DreamjobPageImage','DreamjobJobOpening','DreamjobCvCategory','DreamjobListGraducation');
+ public $uses = array('DreamjobListGraducation', 'DreamjobWorker', 'DreamjobCompany', 'DreamjobPageText', 'DreamjobPageImage', 'DreamjobJobOpening', 'DreamjobCvCategory', 'DreamjobListGraducation', 'Mannerofaddress');
public $components = array('MiconwareSession','RequestHandler');
/**
@@ -149,38 +149,52 @@ class UserController extends AppController {
$this->render('/Home/error');
}else{
if ($this->request->is('post')){
- if($this->request->data['User']['password'] == $this->request->data['User']['password2']) {
+ if($this->request->data['User']['password1'] == $this->request->data['User']['password2']) {
- $profil['User']['password'] = $this->MiconwareSession->create_hash($this->request->data['User']['password']);
+ if($this->request->data['User']['password1']!='')
+ $profil['User']['password'] = $this->MiconwareSession->create_hash($this->request->data['User']['password1']);
+
$profil['DreamjobUser']['city'] = $this->request->data['DreamjobUser']['city'];
$profil['DreamjobUser']['street'] = $this->request->data['DreamjobUser']['street'];
$profil['DreamjobUser']['postcode'] = $this->request->data['DreamjobUser']['postcode'];
$profil['AppUser']['bday'] = $this->request->data['AppUser']['bday'];
+ $profil['AppUser']['first_name'] = $this->request->data['AppUser']['first_name'];
+ $profil['AppUser']['last_name'] = $this->request->data['AppUser']['last_name'];
$result = false;
if($company){
+ $profil['DreamjobCompany']['corporateform'] = $this->request->data['DreamjobCompany']['corporateform'];
+ $profil['DreamjobCompany']['owner'] = $this->request->data['DreamjobCompany']['owner'];
+ $profil['DreamjobCompany']['branch'] = $this->request->data['DreamjobCompany']['branch'];
+ $profil['DreamjobCompany']['headcount'] = $this->request->data['DreamjobCompany']['headcount'];
+ $profil['DreamjobCompany']['bank_details'] = $this->request->data['DreamjobCompany']['bank_details'];
+ $profil['DreamjobCompany']['website'] = $this->request->data['DreamjobCompany']['website'];
$result = $this->DreamjobCompany->saveSettings($profil);
}else{
+ $profil['AppUser']['mannerofaddress_id'] = $this->request->data['AppUser']['mannerofaddress_id'];
$profil['DreamjobWorker']['country'] = $this->request->data['DreamjobWorker']['country'];
$profil['DreamjobWorker']['iam'] = $this->request->data['DreamjobWorker']['iam'];
$profil['DreamjobWorker']['graducation_id'] = $this->request->data['DreamjobWorker']['graducation_id'];
+ $profil['DreamjobWorker']['searchhidden'] = $this->request->data['DreamjobWorker']['searchhidden'];
$result = $this->DreamjobWorker->saveSettings($profil);
}
-
-
+
+
if($result){
$this->MiconwareSession->setFlash('dreamjob.settings.save','flash',array('alert'=>'success'));
}else{
$this->MiconwareSession->setFlash('dreamjob.settings.save.error','flash',array('alert'=>'danger'));
}
- }else{
+
+ }else if($this->request->data['User']['password1']!='' or $this->request->data['User']['password2']!=''){
$this->MiconwareSession->setFlash(__('dreamjob.error.password.notEqual'),'flash',array('alert'=>'danger'));
}
+
}
- $profil['User']['password']='';
$this->request->data = $profil;
$this->set('profil',$profil);
$this->set('graducations',$this->DreamjobListGraducation->find('list'));
+ $this->set('mannerofaddresss',$this->Mannerofaddress->find('list'));
$this->render('/User/settings_account');
}
}
diff --git a/app/View/User/settings_account.ctp b/app/View/User/settings_account.ctp
index 91597f6..31e25a7 100644
--- a/app/View/User/settings_account.ctp
+++ b/app/View/User/settings_account.ctp
@@ -28,23 +28,46 @@ if($profil['AppUser']['take_systemwide']){
=__("dreamjob.settings");?>
Form->create('DreamjobJobApplication',$default_Form);
+ echo $this->Form->create(false,$default_Form);
?>