Subversion Repositories SmartDukaan

Rev

Rev 16910 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 16910 Rev 16916
Line 63... Line 63...
63
		$data = array('user_id'=>$id,'access'=>1);
63
		$data = array('user_id'=>$id,'access'=>1);
64
		$count = $this->Appacl->find('count',array('conditions'=> $data));
64
		$count = $this->Appacl->find('count',array('conditions'=> $data));
65
		if($count==0){
65
		if($count==0){
66
			$this->Appacl->create();
66
			$this->Appacl->create();
67
			if ($this->Appacl->save($data)) {
67
			if ($this->Appacl->save($data)) {
-
 
68
				$this->loadModel('Appaclrevision');
-
 
69
				$historydata = $data;
-
 
70
				$historydata['modifier'] = $this->Auth->User('id');
-
 
71
				$historydata['timestamp'] = date('Y-m-d H:i:s',time());
-
 
72
				$this->Appaclrevision->create();
-
 
73
				$this->Appaclrevision->save($historydata);
68
				$this->Session->setFlash(__('The user has been activated.'));				
74
				$this->Session->setFlash(__('The user has been activated.'));				
69
			} else {
75
			} else {
70
				$this->Session->setFlash(__('The user could not be activated. Please, try again.'));
76
				$this->Session->setFlash(__('The user could not be activated. Please, try again.'));
71
			}
77
			}
72
		}		
78
		}