src/Pyrite/ACL.php
public static function getRoles($userId)
    {
        global $PPHP;
        $db = $PPHP['db'];
        $roles = $db->selectList("SELECT role FROM users_roles WHERE userId=? ORDER BY role ASC", array($userId));
        return $roles !== false ? $roles : array();
    }
public static function getRoles($userId)
    {
        global $PPHP;
        $db = $PPHP['db'];
        $roles = $db->selectList("SELECT role FROM users_roles WHERE userId=? ORDER BY role ASC", array($userId));
        return $roles !== false ? $roles : array();
    }
public static function getRoles ( $ userId ) { global $ PPHP ; $ db = $ PPHP [ 'db' ] ; $ roles = $ db -> selectList ( "SELECT role FROM users_roles WHERE userId=? ORDER BY role ASC" , array ( $ userId ) ) ; return $ roles !== false ? $ roles : array ( ) ; }
Get roles for a user

@param int $userId User ID

@return array Any roles found
Get roles for a user