Crypt field

Discussions related to customizing hooks. Hooks are documented at
Post Reply
A Bindi
Posts: 11
Joined: 2018-01-04 18:45

Crypt field

Post by A Bindi » 2019-06-19 20:07

I would want to populate a table's field with a crypted copy of another field:

table name: an_utenti_servizi
source field: password'
destination field (crypted): password_crypt

Below the hook's after_update function that does not doesn't work :(

named "password_crypt "

Code: Select all

function an_utenti_servizi_after_update($data, $memberInfo, &$args){

		$sql_string = "update an_utenti_servizi set password_crypt = AES_ENCRYPT({$data['password']},'MySecretKey') where id = {$data['id']}"; 
		$result = sql($sql_string, $eo);
		return TRUE;
Can anyone help ?


Post Reply