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


PHP SecurityUtil::Encode方法代码示例

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


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

示例1:

 $fullName = $_POST["fullName"];
 $username = $_POST["username"];
 $Password = $_POST["password"];
 //$conPassword = $_POST["conPassword"];
 $emailId = $_POST["emailId"];
 $active = $_POST["active"];
 $seq = $_POST["seq"];
 $locationSeq = $_POST["l_DropDown"];
 $otherLocations = $_POST["otherLocationSeqs"];
 $user->setLocationSeq($locationSeq);
 $user->setIsManager(false);
 $user->setUserName($username);
 $user->setFullName($fullName);
 $encodedPassword = SecurityUtil::Encode($Password);
 $user->setPassword($encodedPassword);
 $user->setConfirmPassword(SecurityUtil::Encode($conPassword));
 if (!empty($otherLocations)) {
     $user->setOtherLocationSeqs(explode(",", $otherLocations));
 }
 $user->setEmailId($emailId);
 $user->setIsActive($active);
 $user->setSeq($seq);
 //------------------------validations---------------------------------
 $messageText = "";
 $div = "";
 $messageText = validator::validateform("User Name", $username, 56, false);
 if ($locationSeq == 0) {
     $messageText .= "- Please Select Location<br>";
 }
 $messageText .= validator::validateform("Password", $Password, 56, false);
 // if($Password != $conPassword){
开发者ID:munishsethi777,项目名称:eliveui,代码行数:31,代码来源:CreateUserForm.php

示例2: User

        if ($newPassword != $confirmNewPassword) {
            $messageText = "-New password and confirm password does not match";
        }
        if ($savedPasswordDecoded != $earlierPassword) {
            if ($messageText != null && $messageText != "") {
                $messageText = $messageText . "<br/>" . "-Earlier Password does not match with the one in the database";
            } else {
                $messageText = "-Earlier Password does not match with the one in the database";
            }
        }
    }
    if ($messageText != null && $messageText != "") {
        $div = "         <div class='ui-widget'>\n                       <div  class='ui-state-error ui-corner-all' style='padding: 0 .7em;'>\n                               <p><span class='ui-icon ui-icon-alert' style='float: left; margin-right: .3em;'></span>\n                               <strong>Error during change password :</strong> <br/>" . $messageText . "</p>\n                       </div></div>";
    } else {
        $user = new User();
        $user->setPassword(SecurityUtil::Encode($newPassword));
        $user->setSeq($userSeq);
        $userDataStore->updatePassword($user);
        //$configuration->saveConfig($configuration->adminPassword,$newPassword);
        $messageText = "Password updated successfully";
        $div = "<div class='ui-widget'>\n                       <div  class='ui-state-default ui-corner-all' style='padding: 0 .7em;'>\n                               <p><span class='ui-icon ui-icon-alert' style='float: left; margin-right: .3em;'></span>\n                               <strong>Message:</strong>&nbsp;" . $messageText . "</p>\n                       </div></div>";
    }
}
?>

<!DOCTYPE html>
<html>
    <head>
        <?php 
include "_jsAdminInclude.php";
?>
开发者ID:munishsethi777,项目名称:eliveui,代码行数:31,代码来源:ChangePassword.php

示例3:

    if ($messageText == "") {
        if ($newPassword != $confirmNewPassword) {
            $messageText = "-New password and confirm password does not match";
        }
        if ($oldPassword != $earlierPassword) {
            if ($messageText != null && $messageText != "") {
                $messageText = $messageText . "<br/>" . "-Earlier Password does not match with the one in the database";
            } else {
                $messageText = "-Earlier Password does not match with the one in the database";
            }
        }
    }
    if ($messageText != null && $messageText != "") {
        $div = StringUtils::getMessage("Change Passowrd", $messageText, true);
    } else {
        $newPassword = SecurityUtil::Encode($newPassword);
        $user->setPassword($newPassword);
        $UDS->updatePassword($user);
        $messageText = "Password updated successfully";
        $div = StringUtils::getMessage("", $messageText, false);
    }
}
?>


 
<!DOCTYPE html>
<html>
    <head>
      
    </head>
开发者ID:munishsethi777,项目名称:eliveui,代码行数:31,代码来源:ChangeUserPassword.php

示例4: ArrayObject

<?php

require_once 'IConstants.inc';
require $ConstantsArray['dbServerUrl'] . "DataStoreMgr/UserDataStore.php";
$div = "";
if ($_POST["submit"] != "") {
    $username = $_POST["username"];
    $password = $_POST["password"];
    $password = SecurityUtil::Encode($password);
    $UDS = UserDataStore::getInstance();
    $manager = $UDS->FindManagerByUsernamePassword($username, $password);
    if ($manager != NULL) {
        session_start();
        $arr = new ArrayObject();
        $arr['username'] = $manager->getUserName();
        $arr['seq'] = $manager->getSeq();
        $arr['locSeq'] = $manager->getLocationSeq();
        $_SESSION["managerSession"] = $arr;
        header("Location:managerTabs.php");
        $msg = "Welcome";
    } else {
        $msg = "-Invalid Password";
        $div = "<div class='ui-widget'>\n                       <div  class='ui-state-error ui-corner-all' style='padding: 0 .7em;'> \n                               <p><span class='ui-icon ui-icon-alert' style='float: left; margin-right: .3em;'></span> \n                               <strong>Error During Admin login :</strong> <br/>" . $msg . "</p>\n                       </div></div>";
    }
}
?>
  
<!DOCTYPE html>
<html>
    <head>
        <link type="text/css" href="css/cupertino/jquery-ui-1.8.14.custom.css" rel="stylesheet" />
开发者ID:munishsethi777,项目名称:eliveui,代码行数:31,代码来源:index.php


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