Subversion Repositories SmartDukaan

Rev

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

Rev 18165 Rev 20100
Line 46... Line 46...
46
	}
46
	}
47
 
47
 
48
	public function redirectto(){
48
	public function redirectto(){
49
		$this->layout = 'innerpages';
49
		$this->layout = 'innerpages';
50
		$userId = $this->request->query('user_id');
50
		$userId = $this->request->query('user_id');
51
		if(isset($userId) && !empty($userId)){
51
// 		if(isset($userId) && !empty($userId)){
52
			$this->loadModel('User');
52
// 			$this->loadModel('User');
53
			$dbuser = $this->User->findById($userId);
53
// 			$dbuser = $this->User->findById($userId);
54
			$this->Auth->login($dbuser['User']);
54
// 			$this->Auth->login($dbuser['User']);
55
		}
55
// 		}
56
		$storeId = $this->request->query('store_id');
56
		$storeId = $this->request->query('store_id');
57
		$cachekey = 'store-'.$storeId;
57
		$cachekey = 'store-'.$storeId;
58
		$store = Cache::read($cachekey,'month');
58
		$store = Cache::read($cachekey,'month');
59
		if(empty($store)) {
59
		if(empty($store)) {
60
			$store = $this->Store->find('first',array('recursive'=>-1,'conditions'=>array('id'=>$storeId)));
60
			$store = $this->Store->find('first',array('recursive'=>-1,'conditions'=>array('id'=>$storeId)));