Members

Note: You can use your Sitellite.org account here and vice versa.

Username

Password

Remember Login

Forgot your password?

Not a member? Click here to register

Session Allowed

Home Page | All Pages | Recently Revised | Authors | Feeds |

To check if a user is allowed to access a resource, use the session_allowed() function, which takes the following parameters:

  • $resource - The name of the resource.
  • $access - The level of access. Either 'r', 'w', or 'rw' for Read, Write, or Read and Write.
  • $type - The type of resource. This can be one of 'resource', 'access', 'status', and 'team'.

An example use in PHP is:


<?php

if (session_allowed ('sitellite_page', 'r', 'resource')) {
    // can read web pages
} else {
    // can't read web pages
}

?>

Created on April 23, 2005 1:35 AM by lux

Linked from: Authentication