當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。