Subversion Repositories SmartDukaan

Rev

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

Rev 18831 Rev 18832
Line 361... Line 361...
361
	 	$pincode = 0;
361
	 	$pincode = 0;
362
		$cod = $this->request->query('cod');
362
		$cod = $this->request->query('cod');
363
		$userId = $this->request->query('user_id');
363
		$userId = $this->request->query('user_id');
364
		
364
		
365
		//Added token validation to ensure only user 
365
		//Added token validation to ensure only user 
-
 
366
		$testCheck = !Configure::read('requireusercheck');
-
 
367
		$tokenValidated = 0;
-
 
368
		if($testCheck){
-
 
369
			$tokenValidated =  1;
-
 
370
		}else{
366
	 	$tokenValidated = !Configure::read ( 'requireusercheck' ) || $this->checkToken($userId);
371
			$tokenValidated = $this->checkToken($userId);
-
 
372
		}
-
 
373
		
-
 
374
	 	if($tokenValidated == 0){
-
 
375
			$this->redirect(array('controller'=>'special','action'=>'native','login'));
-
 
376
		}elseif($tokenValidated == -1){
-
 
377
			$this->redirect(array('controller'=>'abouts','action'=>'askforupdate'));
-
 
378
		}
-
 
379
	
367
		if(!empty($userId) && $tokenValidated){			
380
		if(!empty($userId) && $tokenValidated){			
368
			$url = $this->getAutoLoginUrl($userId,$url);
381
			$url = $this->getAutoLoginUrl($userId,$url);
369
	
382
	
370
			if(isset($this->request->data->pincode)){
383
			if(isset($this->request->data->pincode)){
371
				$pincode = $this->request->data->pincode;
384
				$pincode = $this->request->data->pincode;