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


PHP DB_Functions::changePassword方法代码示例

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


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

示例1:

    $result = $db->editPermissionUser($_POST["permission"], $_POST["UserId"]);
}
if (isset($_POST["AdminUserId"])) {
    $result = $db->editAdminUser($_POST["permissionAdmin"], $_POST["AdminUserId"]);
}
if (isset($_POST["AuditorUserId"])) {
    $result = $db->editAuditorUser($_POST["permissionAuditor"], $_POST["AuditorUserId"]);
}
if (isset($_POST["DeleteUserId"])) {
    $result = $db->deleteUser($_POST["DeleteUserId"]);
}
if (isset($_POST["DeleteReport"])) {
    $result = $db->deleteReportRow($_POST["DeleteReport"]);
}
if (isset($_POST["ChangePassword"])) {
    $result = $db->changePassword($_POST["ChangePassword"], $_POST["Email"], $_POST["Pass"]);
}
if (isset($_POST["replaceName"])) {
    $result = $db->replaceResponsible($_POST["replaceName"], $_POST["newName"]);
}
if (isset($_POST["ChangeEmailId"])) {
    $result = $db->editEmail($_POST["ChangeEmailId"], $_POST["NewEmailId"]);
}
if (isset($_POST["ChangePasswordId"])) {
    $result = $db->editPasswordById($_POST["ChangePasswordId"], $_POST["NewPassword"]);
}
if (isset($_POST["selectUser"])) {
    if ($_POST["selectUser"] == "All") {
        $result = $db->getAllReportList();
    } else {
        $result = $db->getReportList($_POST["selectUser"]);
开发者ID:ameerhamza26,项目名称:audit,代码行数:31,代码来源:posting.php

示例2: getPasswordHash

     ?>
     <div class="password-change alert alert-danger fade in" role="alert">
         <p class="lead">
             <span class="glyphicon glyphicon-remove-sign" aria-hidden="true"></span>
             <strong>Error</strong> New password does not match confirmed password.
             <br>
             <a class="alert-link" href="javascript:history.back()">Return and Fix</a>
         </p>
     </div>
     <?php 
     exit;
 } else {
     if (checkPassword($currentpwd)) {
         $db = new DB_Functions();
         $hashedPassword = getPasswordHash($newpass);
         $db->changePassword($_SESSION['email'], $hashedPassword);
         ?>
     <div class="password-change alert alert-success fade in" role="alert">
         <p class="lead">
             <span class="glyphicon glyphicon-ok-sign" aria-hidden="true"></span>
             <strong>Success</strong> Your password has been changed!
         </p>
     </div>
     <script type="text/javascript">
     (function(){
         setTimeout(function(){window.location.href = "./"; }, 1200);
     })();
     </script>
     <?php 
     } else {
         ?>
开发者ID:yashodhank,项目名称:Monitordroid-Web-Application,代码行数:31,代码来源:passwordchange.php

示例3: sendResponse

             }
             sendResponse(200, json_encode($response));
         } else {
             // user failed to store
             $response["error"] = 1;
             $response["error_msg"] = "Error occurred in Registration";
             sendResponse(417, json_encode($response));
         }
     }
 } else {
     if ($tag == 'changePassword') {
         // Request type is check Login
         $name = $_POST['name'];
         $password = $_POST['password'];
         // check for user
         $user = $db->changePassword($name, $password);
         if ($user != false) {
             // user found
             // echo json with success = 1
             $response["success"] = 1;
             sendResponse(200, json_encode($response));
         } else {
             // user not found
             // echo json with error = 1
             $response["name"] = $name;
             $response["password"] = $password;
             $response["error"] = 1;
             $response["error_msg"] = "change password failed!";
             sendResponse(417, json_encode($response));
         }
     } else {
开发者ID:sheepcao,项目名称:dota,代码行数:31,代码来源:upload.php


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