src/User.php
public function authenticateSocial($authResponse)
	{
		$this->debug->groupCollapsed(__METHOD__);
		$return = false;
		$providerkey = $authResponse['auth']['uid'];
		$query = 'SELECT * FROM `user_social` WHERE `providerkey` = '.$this->db->quoteValue($providerkey);
		$users = $this->db->query($query)[0];
		$this->debug->table($users, 'users');
		if ($users) {
			$userid = $users[0]['userid'];
			$this->log('login', $userid, array('provider'=>$authResponse['auth']['provider']));
			$return = $userid;
		}
		$this->debug->groupEnd();
		return $return;
	}
public function authenticateSocial($authResponse)
	{
		$this->debug->groupCollapsed(__METHOD__);
		$return = false;
		$providerkey = $authResponse['auth']['uid'];
		$query = 'SELECT * FROM `user_social` WHERE `providerkey` = '.$this->db->quoteValue($providerkey);
		$users = $this->db->query($query)[0];
		$this->debug->table($users, 'users');
		if ($users) {
			$userid = $users[0]['userid'];
			$this->log('login', $userid, array('provider'=>$authResponse['auth']['provider']));
			$return = $userid;
		}
		$this->debug->groupEnd();
		return $return;
	}
public function authenticateSocial ( $ authResponse ) { $ this -> debug -> groupCollapsed ( __METHOD__ ) ; $ return = false ; $ providerkey = $ authResponse [ 'auth' ] [ 'uid' ] ; $ query = 'SELECT * FROM `user_social` WHERE `providerkey` = ' . $ this -> db -> quoteValue ( $ providerkey ) ; $ users = $ this -> db -> query ( $ query ) [ 0 ] ; $ this -> debug -> table ( $ users , 'users' ) ; if ( $ users ) { $ userid = $ users [ 0 ] [ 'userid' ] ; $ this -> log ( 'login' , $ userid , array ( 'provider' => $ authResponse [ 'auth' ] [ 'provider' ] ) ) ; $ return = $ userid ; } $ this -> debug -> groupEnd ( ) ; return $ return ; }
check if auth response user exists in auth_social table
does not load any user info

@param array $authResponse Opauth auth response array

@return mixed userid or false
check if auth response user exists in auth_social table does not load any user info