Subversion Repositories SmartDukaan

Rev

Rev 20491 | Rev 20493 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 20491 Rev 20492
Line 1551... Line 1551...
1551
			$message = $response['response'][key($response['response'])];
1551
			$message = $response['response'][key($response['response'])];
1552
		}
1552
		}
1553
		$this->set(compact('message'));
1553
		$this->set(compact('message'));
1554
	}
1554
	}
1555
 
1555
 
1556
	public function usercalled($id){
1556
	public function admin_usercalled($id){
1557
		$this->User->id = $id;
1557
		$this->User->id = $id;
1558
		if (!$this->User->exists()) {
1558
		if (!$this->User->exists()) {
1559
			throw new NotFoundException(__('Invalid user'));
1559
			throw new NotFoundException(__('Invalid user'));
1560
		} else {
1560
		} else {
1561
			if($this->User->save(array('status'=>2))){
1561
			if($this->User->save(array('status'=>2))){
Line 1564... Line 1564...
1564
				$this->Session->setFlash(__('User could not be updated'));
1564
				$this->Session->setFlash(__('User could not be updated'));
1565
			}		
1565
			}		
1566
		}
1566
		}
1567
		return $this->redirect($this->referer());
1567
		return $this->redirect($this->referer());
1568
	}
1568
	}
1569
	public function userunreachable($id){
1569
	public function admin_userunreachable($id){
1570
		$this->User->id = $id;
1570
		$this->User->id = $id;
1571
		if (!$this->User->exists()) {
1571
		if (!$this->User->exists()) {
1572
			throw new NotFoundException(__('Invalid user'));
1572
			throw new NotFoundException(__('Invalid user'));
1573
		} else {
1573
		} else {
1574
			if($this->User->save(array('status'=>3))){
1574
			if($this->User->save(array('status'=>3))){