Вход Регистрация
Файл: severus/application/helpers/authme_helper.php
Строк: 33
<?php
/**
 * Authme Authentication Library
 *
 * @package Authentication
 * @category Libraries
 * @author Gilbert Pellegrom
 * @link http://dev7studios.com
 * @version 1.0
 */

function logged_in(){
    
$CI =& get_instance();
    
$CI->load->library('authme');
    
    return 
$CI->authme->logged_in();
}

function 
user($key = ''){
    
$CI =& get_instance();
    
$CI->load->library('session');
    
    
$user = $CI->session->userdata('user');
    if(empty(
$user)) return '';

    if(isset(
$key) && !empty($key)) {
        if(isset(
$user->$key) && !empty($user->$key)) return $user->$key;
    }
    return 
$user;
}

function 
rand_passwd( $length = 8, $chars = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789' ) {
    return 
substr( str_shuffle( $chars ), 0, $length );
}

/* End of file: authme_helper.php */
/* Location: application/helpers/authme_helper.php */
Онлайн: 1
Реклама