View Single Post
Old 04-04-2010, 02:59 PM   #2 (permalink)
delayedinsanity
is cute and cuddly
 
delayedinsanity's Avatar
 
Join Date: Mar 2008
Location: Vegas, Baby
Posts: 963
Thanks: 31
delayedinsanity is on a distinguished road
Default

Without seeing the database it's hard to tell. Have you tried the following?

php Code:
// Your code, then
echo '<pre>' . print_r( $ugroupid, TRUE ) . '</pre>';

// or simply

$result = mysql_query( sprintf( "SELECT usergroupid FROM pam_users WHERE username = '%s' LIMIT 1", $userinfo['username'] ) );
$ugroupid = mysql_result( $result );

Don't forget to double check your $userinfo array and make sure username is properly set as well.
delayedinsanity is offline  
Reply With Quote