PHP Classes

File: examples/user/models/UsersModel.php

Recommend this page to a friend!
  Classes of Haseeb Ahmad Basil   PHP Skeleton Framework   examples/user/models/UsersModel.php   Download  
File: examples/user/models/UsersModel.php
Role: Example script
Content type: text/plain
Description: Example script
Class: PHP Skeleton Framework
Extensive Web application development framework
Author: By
Last change:
Date: 8 years ago
Size: 582 bytes
 

Contents

Class file image Download
<?php

class UsersModel {
    protected
$users;

    function
__construct($locator=null) {
       
$this->users = array(
           
'user' => array(
                   
'userid' => 'user',
                   
'password' => 'user',
                   
'access' => '',
                ),
           
'admin' => array(
                   
'userid' => 'admin',
                   
'password' => 'admin',
                   
'access' => 'admin',
                ),
            );
    }
   
    function
findAuthorized($userid, $password) {
        if (
array_key_exists($userid, $this->users)) {
            if (
$this->users[$userid]['password'] == $password) {
                return
$this->users[$userid];
            }
        }
        return array();
    }

}

?>