Subversion Repositories SmartDukaan

Rev

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

Rev 14970 Rev 14992
Line 116... Line 116...
116
        $token = $_COOKIE['token'];
116
        $token = $_COOKIE['token'];
117
        $this->log("Token : $token",'headers');
117
        $this->log("Token : $token",'headers');
118
        // if(isset($headers['Token']) && !empty($headers['Token'])) {
118
        // if(isset($headers['Token']) && !empty($headers['Token'])) {
119
        if(isset($token) && !empty($token)) {
119
        if(isset($token) && !empty($token)) {
120
        	$this->loadModel('SocialProfile');
120
        	$this->loadModel('SocialProfile');
121
        	$options = array('conditions'=>array('access_token'=>$token,'fields'=>array('user_id'),'recursive'=>-1));
121
        	$options = array('conditions'=>array('access_token'=>$token),'fields'=>array('user_id'),'recursive'=>-1);
122
        	$user = $this->SocialProfile->find('first',$options);
122
        	$user = $this->SocialProfile->find('first',$options);
123
        	$userId = $this->request->query('user_id');
123
        	$userId = $this->request->query('user_id');
124
			if(isset($userId) && !empty($userId)){
124
			if(isset($userId) && !empty($userId)){
125
				if($userId == $user['SocialProfile']['user_id']){
125
				if($userId == $user['SocialProfile']['user_id']){
126
					return true;
126
					return true;