| | |
| | | case 'IDNTOUTF8': |
| | | $returnval = $app->functions->idn_decode($returnval); |
| | | break; |
| | | case 'TOLATIN1': |
| | | $returnval = mb_convert_encoding($returnval, 'ISO-8859-1', 'UTF-8'); |
| | | break; |
| | | case 'TRIM': |
| | | $returnval = trim($returnval); |
| | | break; |
| | |
| | | } elseif(isset($field['encryption']) && $field['encryption'] == 'CRYPT') { |
| | | $record[$key] = $app->auth->crypt_password(stripslashes($record[$key])); |
| | | $sql_insert_val .= "'".$app->db->quote($record[$key])."', "; |
| | | } elseif(isset($field['encryption']) && $field['encryption'] == 'CRYPTMAIL') { |
| | | // The password for the mail system needs to be converted to latin1 before it is hashed. |
| | | $record[$key] = $app->auth->crypt_password(stripslashes($record[$key]),'ISO-8859-1'); |
| | | $sql_insert_val .= "'".$app->db->quote($record[$key])."', "; |
| | | } elseif (isset($field['encryption']) && $field['encryption'] == 'MYSQL') { |
| | | $tmp = $app->db->queryOneRecord("SELECT PASSWORD(?) as `crypted`", stripslashes($record[$key])); |
| | | $record[$key] = $tmp['crypted']; |
| | |
| | | } elseif(isset($field['encryption']) && $field['encryption'] == 'CRYPT') { |
| | | $record[$key] = $app->auth->crypt_password(stripslashes($record[$key])); |
| | | $sql_update .= "`$key` = '".$app->db->quote($record[$key])."', "; |
| | | } elseif(isset($field['encryption']) && $field['encryption'] == 'CRYPTMAIL') { |
| | | // The password for the mail system needs to be converted to latin1 before it is hashed. |
| | | $record[$key] = $app->auth->crypt_password(stripslashes($record[$key]),'ISO-8859-1'); |
| | | $sql_update .= "`$key` = '".$app->db->quote($record[$key])."', "; |
| | | } elseif (isset($field['encryption']) && $field['encryption'] == 'MYSQL') { |
| | | $tmp = $app->db->queryOneRecord("SELECT PASSWORD(?) as `crypted`", stripslashes($record[$key])); |
| | | $record[$key] = $tmp['crypted']; |