Commit 42b7d8c3 authored by tbrehm's avatar tbrehm
Browse files

Changed encrypt function from mysql to php code.

parent 1d81efd3
......@@ -672,7 +672,8 @@ class tform {
if($field['formtype'] == 'PASSWORD') {
$sql_insert_key .= "`$key`, ";
if($field['encryption'] == 'CRYPT') {
$sql_insert_val .= "encrypt('".$record[$key]."'), ";
// $sql_insert_val .= "encrypt('".$record[$key]."'), ";
$sql_insert_val .= "'".crypt($record[$key],substr(md5(time()),0,2))."', ";
} else {
$sql_insert_val .= "md5('".$record[$key]."'), ";
}
......@@ -690,7 +691,8 @@ class tform {
} else {
if($field['formtype'] == 'PASSWORD') {
if($field['encryption'] == 'CRYPT') {
$sql_update .= "`$key` = encrypt('".$record[$key]."'), ";
// $sql_update .= "`$key` = encrypt('".$record[$key]."'), ";
$sql_update .= "`$key` = '".crypt($record[$key],substr(md5(time()),0,2))."', ";
} else {
$sql_update .= "`$key` = md5('".$record[$key]."'), ";
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment