Source for file Auth.php

Documentation is available at Auth.php

  1. <?php
  2.     /**
  3.     * Authentication Functions
  4.     *
  5.     * Currently unused
  6.     *
  7.     * @copyright Copyright (c) 2003, 2004 Mirchev Ideas Ltd. All rights reserved.
  8.     * @package MIPHPF
  9.     */
  10.     
  11.     /**
  12.     */
  13. /*
  14.     require_once('../include/miphpf/model/Users.php');
  15.     require_once('../include/miphpf/const/Consts.php');
  16.  
  17.     # Session Name
  18.     define('MI_SESSION_NAME', 'MIPHPF_SESSION');
  19.     
  20.     # Check if the user is authorized
  21.     function isAuthorized($section = 0)
  22.     {
  23.         mi_session_name(MI_SESSION_NAME);
  24.         session_start();
  25.         if (!array_key_exists('UserID', $_SESSION))
  26.             return false;
  27.  
  28.         $user = new ModelUser;
  29.         $user->readUser($_SESSION['UserID']);
  30.         if ($user->getPrivilege() >= $section)
  31.             return true;
  32.         
  33.         return false;
  34.     }
  35.     
  36.     function getSessionUserID()
  37.     {
  38.         return $_SESSION['UserID'];
  39.     }
  40. */
  41. ?>

Documentation generated on Thu, 08 May 2008 16:57:08 +0300 by phpDocumentor 1.4.1