function login()
 {
     if (isset($_POST['username']) and isset($_POST['password'])) {
         $username = $_POST['username'];
         $password = $_POST['password'];
         if ($this->authenticate($username, $password)) {
             session_start();
             $user = new User();
             $user->User($username);
             $_SESSION['user'] = $user;
             header("Location:index.php");
             exit;
         } else {
             header("Location:index.php?url=users/index/err");
         }
     } else {
         header("Location:index.php?url=users/index");
     }
 }
Ejemplo n.º 2
0
 /**
  * Constructor.
  */
 function ImportedUser()
 {
     $this->roles = array();
     parent::User();
 }
Ejemplo n.º 3
0
 function Group()
 {
     parent::User();
 }
Ejemplo n.º 4
0
 /**
  * Create a new PrivilegeUser instance.
  *
  * @access public
  * @since  2.0
  */
 function PrivilegeUser()
 {
     parent::User();
     $this->secure = array();
 }
Ejemplo n.º 5
0
 function CurrentUser($md5)
 {
     $md5 = db_escape($md5);
     parent::User("md5 = '{$md5}' AND verified = 1");
 }
Ejemplo n.º 6
0
 public function Client($i_FirstName, $i_SecondName, $i_Phone, $i_Email, $i_Rank)
 {
     parent::User($i_FirstName, $i_SecondName, $i_Phone, $i_Email);
     $this->mRank = $i_Rank;
     $this->mID = $s_ID++;
 }
Ejemplo n.º 7
0
 function Guest()
 {
     parent::User();
     $this->info = array('name' => '', 'email' => '', 'id' => 0, 'perms' => 1, 'styleset' => '');
 }
Ejemplo n.º 8
0
 public function Employee($i_FirstName, $i_SecondName, $i_Phone, $i_Email, $i_permisLevel)
 {
     parent::User($i_FirstName, $i_SecondName, $i_Phone, $i_Email);
     $this->permissionsLevel = $i_permisLevel;
     $this->mID = $s_ID++;
 }
 function UserSession($email, $id)
 {
     parent::User($email, $id);
     $this->session = new VisitorSession($email);
 }