Subversion Repositories SmartDukaan

Rev

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

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