Subversion Repositories SmartDukaan

Rev

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

Rev 15583 Rev 15651
Line 102... Line 102...
102
				if(!empty($urlparts['query'])){
102
				if(!empty($urlparts['query'])){
103
					$url .= '?'.$urlparts['query'];	
103
					$url .= '?'.$urlparts['query'];	
104
					$this->log(print_r($url,1),'headers');
104
					$this->log(print_r($url,1),'headers');
105
				}		
105
				}		
106
				$tokenValidated = $this->checkToken($userId);
106
				$tokenValidated = $this->checkToken($userId);
107
				if(isset($userId) && !empty($userId) && $tokenValidated){			
107
				if(isset($userId) && !empty($userId) && $tokenValidated==1){			
108
					$url = $this->getAutoLoginUrl($userId,$url);
108
					$url = $this->getAutoLoginUrl($userId,$url);
109
				} else{
109
				} else{
-
 
110
					if($tokenValidated == 0){
110
					$url = '/special/native/login';
111
						$url = '/special/native/login';
-
 
112
					}elseif($tokenValidated == -1){
-
 
113
						$url = '/abouts/askforupdate';
-
 
114
					}
111
				}
115
				}
112
			}/*else{
116
			}/*else{
113
				$url = $storeProduct['marketPlaceUrl'];
117
				$url = $storeProduct['marketPlaceUrl'];
114
			}*/
118
			}*/
115
			if( strpos($url, '?') === false ) {
119
			if( strpos($url, '?') === false ) {
Line 150... Line 154...
150
	}
154
	}
151
 
155
 
152
	public function redirecttosaholic() {
156
	public function redirecttosaholic() {
153
		$userId = $this->request->query('user_id');
157
		$userId = $this->request->query('user_id');
154
        $tokenValidated = $this->checkToken($userId);
158
        $tokenValidated = $this->checkToken($userId);
155
        if(isset($userId) && !empty($userId) && $tokenValidated){
159
        if(isset($userId) && !empty($userId) && $tokenValidated==1){
156
                $next = "&next=/private-deals/1";
160
                $next = "&next=/private-deals/1";
157
                $redirectUrl = $this->getAutoLoginUrl($userId,$next);
161
                $redirectUrl = $this->getAutoLoginUrl($userId,$next);
158
                header('location:'.$redirectUrl);
162
                header('location:'.$redirectUrl);
159
                exit();
163
                exit();
160
        } else{
164
        } else{
-
 
165
        	if($tokenValidated == 0){
161
                $this->redirect(array('controller'=>'special','action'=>'native','login'));
166
				$this->redirect(array('controller'=>'special','action'=>'native','login'));
-
 
167
			}elseif($tokenValidated == -1){
-
 
168
				$this->redirect(array('controller'=>'abouts','action'=>'askforupdate'));
-
 
169
			}
162
        }
170
        }
163
	}	
171
	}	
164
 
172
 
165
/**
173
/**
166
 * edit method
174
 * edit method