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


PHP auth::register方法代码示例

本文整理汇总了PHP中auth::register方法的典型用法代码示例。如果您正苦于以下问题:PHP auth::register方法的具体用法?PHP auth::register怎么用?PHP auth::register使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在auth的用法示例。


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

示例1: addUser

 /**
  * 添加用户 
  */
 function addUser()
 {
     $role_list = $this->user->roleList('state=1');
     if ($_SERVER['REQUEST_METHOD'] == 'POST') {
         if ($this->user->userExist($_POST['username'])) {
             $this->error('用户名已经存在!');
         }
         if (!empty($_POST['email']) && $this->user->emailExist($_POST['email'])) {
             $this->error('Email已经存在!');
         }
         $auth_class = new auth();
         C('AUTH_EMAIL_ACTIVATE', FALSE);
         //关闭电子邮件激活
         if ($auth_class->register($_POST)) {
             $this->success('添加成功');
         }
     }
     $this->assign('role_list', $role_list);
     $this->display();
 }
开发者ID:com-itzcy,项目名称:hdjob,代码行数:23,代码来源:userControl.php

示例2: auth

<?php

require_once './../persistence.class.php';
require_once './../auth.class.php';
$uid = "eddadmin";
$pass = "root";
$userData = ['FirstName' => 'dont', 'LastName' => 'fail', 'Username' => 'this', 'Email' => 'unit', 'Gender' => 'test'];
$auth = new auth($uid);
$user = $auth->register($uid, $pass, $userData);
$status = $user->authenticated() ? "Sucess" : $user->fail_reason();
echo $status;
开发者ID:occupytheweb,项目名称:edd-bakery,代码行数:11,代码来源:register_test.php

示例3: dirname

<?php

require dirname(__FILE__) . '/../dbConnection.php';
require dirname(__FILE__) . '/../lib/auth.class.php';
$auth = new auth();
$username = $_POST["email"];
$email = $username;
$password = $_POST["password"];
$reEntryPassword = $password;
$currency = $_POST["currency"];
$auth->register($username, $password, $reEntryPassword, $email, $currency);
开发者ID:nicolabortignon,项目名称:easybuy,代码行数:11,代码来源:register.php

示例4:

                  <input type="password" name="pass" placeholder="Пароль" required>
                  <input type="submit" name="login" value="Авторизироваться!">
                  </form>
                  <a href="?action=register">Register</a>
                  ';
}
if (isset($_GET['action']) and $_GET['action'] == 'logout') {
    //logouting
    $user->logout();
}
if (isset($_POST['login'])) {
    //logging
    if ($user->login($_POST['nick'], $_POST['pass'])) {
    } else {
        echo $user->error_msg;
    }
}
if (isset($_POST['register'])) {
    //registering
    if ($user->register($_POST['nick'], $_POST['email'], $_POST['pass'], $_POST['r_pass'], $_POST['name'])) {
    } else {
        echo $user->error_msg;
    }
}
if (isset($_POST['check'])) {
    //validating
    if (!$user->verify($_POST['code'])) {
        echo $user->error_msg;
    }
}
include 'footer.php';
开发者ID:smsochneg,项目名称:Qeebee,代码行数:31,代码来源:login.php


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