From 466bffa73d30a57f11675b55f77e10187e62c729 Mon Sep 17 00:00:00 2001 From: Andrew McMillan Date: Thu, 18 Mar 2010 22:01:38 +1300 Subject: [PATCH] Fix privileges insert. --- inc/auth-functions.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/inc/auth-functions.php b/inc/auth-functions.php index 8c4969c0..99f55944 100644 --- a/inc/auth-functions.php +++ b/inc/auth-functions.php @@ -124,7 +124,7 @@ function UpdateUserFromExternal( &$usr ) { if ( isset($usr->active) && ($usr->active === 'f' || $usr->active === false) ) return false; if ( $type == 'INSERT' ) { - $qry = new AwlQuery( 'INSERT INTO principal( type_id, user_no, displayname, default_privileges) SELECT 1, user_no, fullname, :privs::BIT(24) FROM usr WHERE username=:username', + $qry = new AwlQuery( 'INSERT INTO principal( type_id, user_no, displayname, default_privileges) SELECT 1, user_no, fullname, :privs::INT::BIT(24) FROM usr WHERE username=:username', array( ':privs' => privilege_to_bits($c->default_privileges), ':username' => $usr->username) ); $qry->Exec('Login',__LINE__,__FILE__); CreateHomeCalendar($usr->username);