コード例 #1
0
/**
 * Hashes a plain text password.
 *
 * @deprecated since release 6.2.0
 * @since 1.0.0
 * @param string $password
 *            Plain text password
 * @return mixed
 */
function et_hash_password($password)
{
    _deprecated_function(__FUNCTION__, '6.2.0', 'etsis_hash_password');
    return etsis_hash_password($password);
}
コード例 #2
0
ファイル: core-function.php プロジェクト: parkerj/eduTrac-SIS
/**
 * Used by etsis_check_password in order to rehash
 * an old password that was hashed using MD5 function.
 *
 * @since 6.2.0
 * @param string $password
 *            Person password.
 * @param int $person_id
 *            Person ID.
 * @return mixed
 */
function etsis_set_password($password, $person_id)
{
    $app = \Liten\Liten::getInstance();
    $hash = etsis_hash_password($password);
    $q = $app->db->person();
    $q->password = $hash;
    $q->where('personID = ?', $person_id)->update();
}
コード例 #3
0
ファイル: person.router.php プロジェクト: parkerj/eduTrac-SIS
     $pass = $dob . $passSuffix;
 } else {
     $pass = '******' . $passSuffix;
 }
 Node::dispense('reset_password');
 $node = Node::table('reset_password');
 $node->uname = (string) _h($person->uname);
 $node->email = (string) _h($person->email);
 $node->name = (string) get_name(_h($person->personID));
 $node->personid = (int) _h($person->personID);
 $node->fname = (string) _h($person->fname);
 $node->lname = (string) _h($person->lname);
 $node->password = (string) $pass;
 $node->sent = (int) 0;
 $node->save();
 $password = etsis_hash_password($pass);
 $q2 = $app->db->person();
 $q2->password = $password;
 $q2->where('personID = ?', $id);
 if ($q2->update()) {
     /**
      *
      * @since 6.1.07
      */
     $pass = [];
     $pass['pass'] = $pass;
     $pass['personID'] = $id;
     $pass['uname'] = $person->uname;
     $pass['fname'] = $person->fname;
     $pass['lname'] = $person->lname;
     $pass['email'] = $person->email;
コード例 #4
0
ファイル: index.router.php プロジェクト: parkerj/eduTrac-SIS
 if ($app->req->isPost()) {
     $pass = $app->db->person()->select('personID,password')->where('personID = ?', get_persondata('personID'));
     $q = $pass->find(function ($data) {
         $array = [];
         foreach ($data as $d) {
             $array[] = $d;
         }
         return $array;
     });
     $a = [];
     foreach ($q as $r) {
         $a[] = $r;
     }
     if (etsis_check_password($_POST['currPass'], $r['password'], $r['personID'])) {
         $sql = $app->db->person();
         $sql->password = etsis_hash_password($_POST['newPass']);
         $sql->where('personID = ?', get_persondata('personID'));
         if ($sql->update()) {
             /**
              * @since 6.1.07
              */
             $pass = [];
             $pass['pass'] = $_POST['newPass'];
             $pass['personID'] = get_persondata('personID');
             $pass['uname'] = get_persondata('uname');
             $pass['fname'] = get_persondata('fname');
             $pass['lname'] = get_persondata('lname');
             $pass['email'] = get_persondata('email');
             /**
              * Fires after password was updated successfully.
              *