<?php
/**
 * User_model
 */
class User_model extends Model {
    
    function User_model()
    {
        parent::Model();
    }
    
    function isAdmin()
    {
        $this->load->library('phpsession');
        
        $admin = $this->phpsession->get('admin');
        if ($admin == null)
        {
            return false;
        }
        return true;
    }
    
    function isUser()
    {
        $this->load->library('phpsession');
        
        $user = $this->phpsession->get('user');
        if ($user == null)
        {
            return false;
        }
        return true;
    }
}
