mirror of
https://gitlab.com/davical-project/davical.git
synced 2026-09-23 06:39:18 +00:00
Switch to AwlQuery library.
This commit is contained in:
parent
e1c924aadb
commit
5bc17b0acd
@ -9,8 +9,6 @@
|
|||||||
* @license http://gnu.org/copyleft/gpl.html GNU GPL v2
|
* @license http://gnu.org/copyleft/gpl.html GNU GPL v2
|
||||||
*/
|
*/
|
||||||
|
|
||||||
require_once('PgQuery.php');
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* A Class for handling a session using HTTP Basic Authentication
|
* A Class for handling a session using HTTP Basic Authentication
|
||||||
*
|
*
|
||||||
@ -261,8 +259,9 @@ class HTTPAuthSession {
|
|||||||
*/
|
*/
|
||||||
function GetRoles () {
|
function GetRoles () {
|
||||||
$this->roles = array();
|
$this->roles = array();
|
||||||
$qry = new PgQuery( 'SELECT role_name FROM role_member m join roles r ON r.role_no = m.role_no WHERE user_no = ? ', $this->user_no );
|
$qry = new AwlQuery( 'SELECT role_name FROM role_member m join roles r ON r.role_no = m.role_no WHERE user_no = :user_no ',
|
||||||
if ( $qry->Exec('BasicAuth') && $qry->rows > 0 ) {
|
array( ':user_no' => $this->user_no) );
|
||||||
|
if ( $qry->Exec('BasicAuth') && $qry->rows() > 0 ) {
|
||||||
while( $role = $qry->Fetch() ) {
|
while( $role = $qry->Fetch() ) {
|
||||||
$this->roles[$role->role_name] = true;
|
$this->roles[$role->role_name] = true;
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user