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


PHP ctrl_users::CheckUserEmailIsUnique方法代码示例

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


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

示例1: CheckCreateForErrors

 static function CheckCreateForErrors($username, $packageid, $groupid, $email, $password = "")
 {
     global $zdbh;
     $username = strtolower(str_replace(' ', '', $username));
     // Check to make sure the username is not blank or exists before we go any further...
     if (!fs_director::CheckForEmptyValue($username)) {
         $sql = "SELECT COUNT(*) FROM x_accounts WHERE UPPER(ac_user_vc)=:user AND ac_deleted_ts IS NULL";
         $numrows = $zdbh->prepare($sql);
         $user = strtoupper($username);
         $numrows->bindParam(':user', $user);
         if ($numrows->execute()) {
             if ($numrows->fetchColumn() != 0) {
                 self::$alreadyexists = true;
                 return false;
             }
         }
         if (!self::IsValidUserName($username)) {
             self::$badname = true;
             return false;
         }
     } else {
         self::$userblank = true;
         return false;
     }
     // Check to make sure the packagename is not blank and exists before we go any further...
     if (!fs_director::CheckForEmptyValue($packageid)) {
         $sql = "SELECT COUNT(*) FROM x_packages WHERE pk_id_pk=:packageid AND pk_deleted_ts IS NULL";
         $numrows = $zdbh->prepare($sql);
         $numrows->bindParam(':packageid', $packageid);
         if ($numrows->execute()) {
             if ($numrows->fetchColumn() == 0) {
                 self::$packageblank = true;
                 return false;
             }
         }
     } else {
         self::$packageblank = true;
         return false;
     }
     // Check to make sure the groupname is not blank and exists before we go any further...
     if (!fs_director::CheckForEmptyValue($groupid)) {
         $sql = "SELECT COUNT(*) FROM x_groups WHERE ug_id_pk=:groupid";
         $numrows = $zdbh->prepare($sql);
         $numrows->bindParam(':groupid', $groupid);
         if ($numrows->execute()) {
             if ($numrows->fetchColumn() == 0) {
                 self::$groupblank = true;
                 return;
             }
         }
     } else {
         self::$groupblank = true;
         return false;
     }
     // Check for invalid characters in the email and that it exists...
     if (!fs_director::CheckForEmptyValue($email)) {
         if (!self::IsValidEmail($email)) {
             self::$bademail = true;
             return false;
         }
     } else {
         self::$emailblank = true;
         return false;
     }
     // Check that the email address is unique to the user's table
     if (!fs_director::CheckForEmptyValue($email)) {
         if (ctrl_users::CheckUserEmailIsUnique($email)) {
             self::$not_unique_email = false;
             return true;
         } else {
             self::$not_unique_email = true;
             return false;
         }
     } else {
         self::$not_unique_email = true;
         return false;
     }
     // Check for password length...
     if (!fs_director::CheckForEmptyValue($password)) {
         if (strlen($password) < ctrl_options::GetSystemOption('password_minlength')) {
             self::$badpassword = true;
             return false;
         }
     } else {
         self::$passwordblank = true;
         return false;
     }
     return true;
 }
开发者ID:Boter,项目名称:madmin-core,代码行数:89,代码来源:controller.ext.php


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