Subversion Repositories SmartDukaan

Rev

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

Rev 13596 Rev 13597
Line 54... Line 54...
54
	}
54
	}
55
 
55
 
56
	public function deals(){
56
	public function deals(){
57
		$userId = $this->request->query('user_id');
57
		$userId = $this->request->query('user_id');
58
		if(isset($userId) && !empty($userId)){
58
		if(isset($userId) && !empty($userId)){
-
 
59
			$this->loadModel('User');
-
 
60
			$dbuser = $this->User->findById($userId);
59
			$this->Auth->login($userId);
61
			$this->Auth->login($dbuser['User']);	
60
		}
62
		}
61
		$likedDeals = $disLikedDeals = array();
63
		$likedDeals = $disLikedDeals = array();
62
		$this->loadModel('Api');
64
		$this->loadModel('Api');
63
		$apideals = $this->Api->getCategoryDeals($this->Auth->User('id'),1);
65
		$apideals = $this->Api->getCategoryDeals($this->Auth->User('id'),1);
64
		$categorydeals = $apideals['products'];
66
		$categorydeals = $apideals['products'];