Subversion Repositories SmartDukaan

Rev

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

Rev 13672 Rev 13682
Line 20... Line 20...
20
		$this->Auth->allow('add');
20
		$this->Auth->allow('add');
21
		$this->apihost = Configure::read('pythonapihost');
21
		$this->apihost = Configure::read('pythonapihost');
22
	}
22
	}
23
	
23
	
24
	public function mine() {
24
	public function mine() {
-
 
25
		$userId = $this->request->query('user_id');
-
 
26
		if(isset($userId) && !empty($userId)){
-
 
27
			$this->loadModel('User');
-
 
28
			$dbuser = $this->User->findById($userId);
-
 
29
			$this->Auth->login($dbuser['User']);	
-
 
30
		}
25
		$this->layout = "innerpages";
31
		$this->layout = "innerpages";
26
		$url = $this->apihost."storeorder/user/".$this->Auth->User('id')."?page=1&window=10";
32
		$url = $this->apihost."storeorder/user/".$this->Auth->User('id')."?page=1&window=10";
27
		$response = $this->make_request($url,null);
33
		$response = $this->make_request($url,null);
28
		if(!empty($response['data'])){
34
		if(!empty($response['data'])){
29
			$this->set('orders',$response['data']);
35
			$this->set('orders',$response['data']);