Subversion Repositories SmartDukaan

Rev

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

Rev 14894 Rev 14897
Line 103... Line 103...
103
    }
103
    }
104
 
104
 
105
    function checkToken() {
105
    function checkToken() {
106
		$headers =  $this->getallheaders();
106
		$headers =  $this->getallheaders();
107
        $this->log(print_r($headers,1),'headers');
107
        $this->log(print_r($headers,1),'headers');
108
        $token = $this->Cookie->read('token');
108
        $token = $_COOKIE['token'];
109
        $this->log("Token : $token",'headers');
109
        $this->log("Token : $token",'headers');
110
        // if(isset($headers['Token']) && !empty($headers['Token'])) {
110
        // if(isset($headers['Token']) && !empty($headers['Token'])) {
111
        if(isset($token) && !empty($token)) {
111
        if(isset($token) && !empty($token)) {
112
        	$this->loadModel('SocialProfile');
112
        	$this->loadModel('SocialProfile');
113
        	$options = array('conditions'=>array('access_token'=>$token,'fields'=>array('user_id'),'recursive'=>-1));
113
        	$options = array('conditions'=>array('access_token'=>$token,'fields'=>array('user_id'),'recursive'=>-1));