public function getSessionUID($hash)
    {
        $query = "SELECT uid FROM {$this->config->table_sessions} WHERE hash = :hash";
        $query_prepared = $this->dbh->prepare($query);
        $query_params = [
            'hash' => $hash
        ];
        $query_prepared->execute($query_params);

        if ($query_prepared->rowCount() == 0) {
            return false;
        }

        return $query_prepared->fetch(\PDO::FETCH_ASSOC)['uid'];
    }
public function getSessionUID($hash)
    {
        $query = "SELECT uid FROM {$this->config->table_sessions} WHERE hash = :hash";
        $query_prepared = $this->dbh->prepare($query);
        $query_params = [
            'hash' => $hash
        ];
        $query_prepared->execute($query_params);

        if ($query_prepared->rowCount() == 0) {
            return false;
        }

        return $query_prepared->fetch(\PDO::FETCH_ASSOC)['uid'];
    }
public function getSessionUID ( $ hash ) { $ query = "SELECT uid FROM {$this->config->table_sessions} WHERE hash = :hash" ; $ query_prepared = $ this -> dbh -> prepare ( $ query ) ; $ query_params = [ 'hash' => $ hash ] ; $ query_prepared -> execute ( $ query_params ) ; if ( $ query_prepared -> rowCount ( ) == 0 ) { return false ; } return $ query_prepared -> fetch ( \ PDO :: FETCH_ASSOC ) [ 'uid' ] ; }
Retrieves the UID associated with a given session hash
@param string $hash
@return int $uid
Retrieves the UID associated with a given session hash