Subversion Repositories SmartDukaan

Rev

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

Rev 15523 Rev 15651
Line 36... Line 36...
36
	}
36
	}
37
 
37
 
38
	public function mywallet() {
38
	public function mywallet() {
39
		$userId = $this->request->query('user_id');
39
		$userId = $this->request->query('user_id');
40
		$tokenValidated = $this->checkToken($userId);
40
		$tokenValidated = $this->checkToken($userId);
41
		if(isset($userId) && !empty($userId) && $tokenValidated){	
41
		if(isset($userId) && !empty($userId) && $tokenValidated==1){	
42
			$next = "/my-wallet";					
42
			$next = "/my-wallet";					
43
			$redirectUrl = $this->getAutoLoginUrl($userId,$next);
43
			$redirectUrl = $this->getAutoLoginUrl($userId,$next);
44
			$this->log($redirectUrl,'headers');
44
			$this->log($redirectUrl,'headers');
45
			$this->layout = 'innerpages';
45
			$this->layout = 'innerpages';
46
			$this->set(compact('redirectUrl'));
46
			$this->set(compact('redirectUrl'));
47
		}else{
47
		}else{
-
 
48
			if($tokenValidated == 0){
48
			$this->redirect(array('controller'=>'special','action'=>'native','login'));
49
				$this->redirect(array('controller'=>'special','action'=>'native','login'));
-
 
50
			}elseif($tokenValidated == -1){
-
 
51
				$this->redirect(array('controller'=>'abouts','action'=>'askforupdate'));
-
 
52
			}
49
		}
53
		}
50
	}
54
	}
51
 
55
 
52
	public function socialauth() {
56
	public function socialauth() {
53
		$this->layout = "ajax";
57
		$this->layout = "ajax";