当前位置: 首页>>代码示例>>PHP>>正文


PHP user_login函数代码示例

本文整理汇总了PHP中user_login函数的典型用法代码示例。如果您正苦于以下问题:PHP user_login函数的具体用法?PHP user_login怎么用?PHP user_login使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了user_login函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: index

	function index()
	{
		//validate login
		if (user_login())
		{
			if($this->session->userdata('user_type') != 'reseller')
			{
				redirect ('home/');
			}
            else
            {
                $data['page_name']		=	'dashboard';
                $data['selected']		=	'dashboard';
                $data['page_title']		=	'DASHBOARD';
                $data['main_menu']	    =	'default/main_menu/reseller_main_menu';
                $data['sub_menu']	    =	'';
                $data['main_content']	=	'reseller/dashboard';
                $this->load->view('default/template',$data);
            }
		}
        else
        {
            redirect ('home/'); //main home controller
        }
	}
开发者ID:rithyskun,项目名称:vBilling,代码行数:25,代码来源:home.php

示例2: __construct

	function __construct()
	{
		parent::__construct();
		$this->load->model('freeswitch_model');
		// validate login
		if (!user_login())
		 {
		            redirect ('home/');
		 }
		//  else
		//  {
		//             if($this->session->userdata('user_type') == 'customer')
		//             {
		//                redirect ('customer/');
		//             }
		//             
		//             if($this->session->userdata('user_type') == 'reseller')
		// 	{
		// 		redirect ('reseller/');
		// 	}
		//              
		//             if($this->session->userdata('user_type') == 'sub_admin')
		//             {
		//                 if(sub_admin_access_any_cell($this->session->userdata('user_id'), 'view_profiles') == 0)
		//                 {
		//                     redirect ('home/');
		//                 }
		//             }
		//  }
	}
开发者ID:rithyskun,项目名称:vBilling,代码行数:30,代码来源:freeswitch.php

示例3: __construct

	function __construct()
	{
		parent::__construct();
		$this->load->model('groups_model');
		$this->load->model('carriers_model');

		//validate login
		if (!user_login())
		{
			redirect ('home/');
		}
		else
		{
			if($this->session->userdata('user_type') == 'customer')
			{
				redirect ('customer/');
			}
            
            if($this->session->userdata('user_type') == 'reseller')
			{
				redirect ('reseller/');
			}
            
            if($this->session->userdata('user_type') == 'sub_admin')
            {
                if(sub_admin_access_any_cell($this->session->userdata('user_id'), 'view_rate_groups') == 0)
                {
                    redirect ('home/');
                }
            }
		}
	}
开发者ID:rithyskun,项目名称:vBilling,代码行数:32,代码来源:groups.php

示例4: __construct

	function __construct()
	{
		parent::__construct();
		$this->load->model('manage_accounts_model');

		//validate login
		if (!user_login())
		{
			redirect ('home/');
		}
		else
		{
			if($this->session->userdata('user_type') == 'customer')
			{
				redirect ('customer/');
			}
            
            if($this->session->userdata('user_type') == 'reseller')
			{
				redirect ('reseller/');
			}
            
            if($this->session->userdata('user_type') == 'sub_admin')
			{
				redirect ('home/');
			}
		}
	}
开发者ID:rithyskun,项目名称:vBilling,代码行数:28,代码来源:manage_accounts.php

示例5: ajax_login

 public function ajax_login()
 {
     $return = false;
     if (user_login()) {
         $return = '<span>您好,' . $_SESSION['user_login']['uname'] . '</span><b>|</b><a href="' . U('user/logout') . '">登出</a>';
     }
     echo $return;
 }
开发者ID:kjzwj,项目名称:jcms,代码行数:8,代码来源:indexAction.class.php

示例6: access

 protected function access()
 {
     // 获取当前用户ID
     if (user_login() <= 0) {
         // 还没登录 跳转到登录页面
         $this->redirect('user/login', '', '1', '请登录...');
     }
 }
开发者ID:kjzwj,项目名称:jcms,代码行数:8,代码来源:frontendAction.class.php

示例7: authenticate

 /**
  * Authenticate user
  *
  * @static
  * @param _array $user
  * @param array $user['login']
  * @param array $user['password']
  * @return string session ID
  */
 public static function authenticate($user)
 {
     $login = user_login($user['user'], $user['password'], ZBX_AUTH_INTERNAL);
     if ($login) {
         return $login;
     } else {
         self::$error = array('error' => ZBX_API_ERROR_PARAMETERS, 'data' => 'Given login or password is incorrect.');
     }
 }
开发者ID:phedders,项目名称:zabbix,代码行数:18,代码来源:class.cuser.php

示例8: smarty_validate_criteria_isValidPassword

/**
 * test if a value is a valid range
 *
 * @param string $value the value being tested
 * @param boolean $empty if field can be empty
 * @param array params validate parameter values
 * @param array formvars form var values
 */
function smarty_validate_criteria_isValidPassword($value, $empty, &$params, &$formvars)
{
    if (!isset($params['field2'])) {
        trigger_error("SmartyValidate: [isValidPassword] parameter 'field2' is missing.");
        return false;
    }
    if (strlen($value) == 0) {
        return $empty;
    }
    return user_login($formvars[$params['field']], $formvars[$params['field2']]);
}
开发者ID:mroussel,项目名称:flatpress,代码行数:19,代码来源:validate_criteria.isValidPassword.php

示例9: Grader

 function Grader()
 {
     parent::Controller();
     $this->load->model('home_model');
     $this->load->model('user_model');
     $this->load->model('admin_model');
     $this->load->helper('check_login');
     $this->load->helper('breadcrumb');
     if (!user_login()) {
         redirect('main/home/user_login');
     }
 }
开发者ID:baltimoreteacher,项目名称:Grading,代码行数:12,代码来源:grader.php

示例10: _initialize

 public function _initialize()
 {
     parent::_initialize();
     $this->_mod = D('user');
     $this->_userid = user_login();
     if ($this->_userid) {
         $userinfo = $this->_mod->find($this->_userid);
         $this->assign('userid', $this->_userid);
         $this->assign('userinfo', $userinfo);
     }
     $this->assign('current', 'user');
     $seo['title'] = '会员中心';
     $this->_seo($seo);
 }
开发者ID:kjzwj,项目名称:jcms,代码行数:14,代码来源:userAction.class.php

示例11: Login

function Login()
{
    $smarty = smarty_init(dirname(__FILE__) . '/templates');
    if (isset($_REQUEST['submit'])) {
        $data = formdata_from_post();
        $errors = formdata_validate($data);
        if (count($errors) == 0) {
            user_login($data['Extension']);
            header('Location: Account_Modify.php');
            die;
        }
    }
    $smarty->assign('Errors', $errors);
    return $smarty->fetch('Login.tpl');
}
开发者ID:rakesh-mohanta,项目名称:yunapbx,代码行数:15,代码来源:Login.php

示例12: __construct

	function __construct()
	{
		parent::__construct();
		$this->load->model('reseller/billing_model');
		$this->load->library('pdf');
		//validate login
		if (!user_login())
		{
			redirect ('home/');
		}
		else
		{
            if($this->session->userdata('user_type') != 'reseller')
			{
				redirect ('home/');
			}
		}
	}
开发者ID:rithyskun,项目名称:vBilling,代码行数:18,代码来源:billing.php

示例13: __construct

	function __construct()
	{
		parent::__construct();
		$this->load->model('reseller/groups_model');
		$this->load->model('reseller/carriers_model');

		//validate login
		if (!user_login())
		{
			redirect ('home/');
		}
		else
		{
			if($this->session->userdata('user_type') != 'reseller')
			{
				redirect ('home/');
			}
		}
	}
开发者ID:rithyskun,项目名称:vBilling,代码行数:19,代码来源:groups.php

示例14: __construct

	function __construct()
	{
		parent::__construct();
		$this->load->model('customer_model');
		$this->load->model('groups_model');
		$this->load->model('manage_accounts_model');
        $this->load->model('billing_model');
		//validate login
		if (!user_login())
		{
			redirect ('home/');
		}
		else
		{
			if($this->session->userdata('user_type') != 'customer')
			{
				redirect ('home/');
			}
		}
	}
开发者ID:rithyskun,项目名称:vBilling,代码行数:20,代码来源:customer.php

示例15: login_validate

function login_validate()
{
    global $smarty, $lang;
    $user = trim(@$_POST['user']);
    $pass = trim(@$_POST['pass']);
    $error = array();
    $lerr =& $lang['login']['error'];
    if (!$user) {
        $error['user'] = $lerr['user'];
    }
    if (!$pass) {
        $error['pass'] = $lerr['pass'];
    }
    if (!$error && !user_login($user, $pass)) {
        $error['match'] = $lerr['match'];
    }
    if ($error) {
        $smarty->assign('error', $error);
        return 0;
    }
    return 1;
}
开发者ID:mroussel,项目名称:flatpress,代码行数:22,代码来源:login.php


注:本文中的user_login函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。