This is the global 'has_access' function it can check for any 'type' of object everything uses the global 0,5,25,50,75,100 stuff. GLOBALS['user'] is always used
This checks to see if the specified session of the specified type exists, it also provides an array of key'd data that may be required based on the type