how to create MD5 field in appgini ?
-
- Veteran Member
- Posts: 32
- Joined: 2021-06-12 21:01
how to create MD5 field in appgini ?
i need to create MD5 field in appgini , please help.
Re: how to create MD5 field in appgini ?
Hi, can you provide a little bit more information about what you try. You can use the PHP md5() function or the MYSQL function md5() function.
Any help offered comes with the best of intentions. Use it at your own risk. In any case, please make a backup of your existing environment before applying any changes.
-
- Veteran Member
- Posts: 32
- Joined: 2021-06-12 21:01
Re: how to create MD5 field in appgini ?
i have password field from another custom application that i linked it to appgini app.
all users_table will be handled by appgini app.
is there any solution for it? to update create user with md5 password field?
all users_table will be handled by appgini app.
is there any solution for it? to update create user with md5 password field?
Re: how to create MD5 field in appgini ?
(a) Do you just want to save a string, md5-encrypted, in one of your AppGini generated tables or
(b) do you want to overwrite AppGini user's passwords with md5-encrypted strings stored in a different database?
More information, please!
(b) do you want to overwrite AppGini user's passwords with md5-encrypted strings stored in a different database?
More information, please!
Kind regards,
<js />
My AppGini Blog:
https://appgini.bizzworxx.de/blog
You can help us helping you:
Please always put code fragments inside
AppGini 24.10 Revision 1579 + all AppGini Helper tools
<js />
My AppGini Blog:
https://appgini.bizzworxx.de/blog
You can help us helping you:
Please always put code fragments inside
[code]...[/code]
blocks for better readabilityAppGini 24.10 Revision 1579 + all AppGini Helper tools
-
- Veteran Member
- Posts: 32
- Joined: 2021-06-12 21:01
-
- Veteran Member
- Posts: 32
- Joined: 2021-06-12 21:01
Re: how to create MD5 field in appgini ?
option (a)
i want to save a string md5-encrypted.
i want to save a string md5-encrypted.
Re: how to create MD5 field in appgini ?
There are several tasks:
(1) As mentioned before by pböttcher, you can use PHP's (or MySQL's) md5 function in before_insert and before_update hook for encrypting user input and storing it in DB. Just read the plain text password within $data array, encrypt it, then store it:
That sample requires both fields (text and textMd5) available in DV, NOT readonly
Cution: don't encrypt already encrypted values again. What I mean: if you only have one field, don't encrypt the value over and over again on every save.
(2) if you need to hide any value in UI behind *******, you should use
If you have two fields, you may want to hide the 2nd field:
(1) As mentioned before by pböttcher, you can use PHP's (or MySQL's) md5 function in before_insert and before_update hook for encrypting user input and storing it in DB. Just read the plain text password within $data array, encrypt it, then store it:
$data['textMd5'] = md5($data['text']);
That sample requires both fields (text and textMd5) available in DV, NOT readonly
Cution: don't encrypt already encrypted values again. What I mean: if you only have one field, don't encrypt the value over and over again on every save.
(2) if you need to hide any value in UI behind *******, you should use
jQuery('#text').attr('type', 'password');
in hooks/TABLENAME-dv.js. If you have two fields, you may want to hide the 2nd field:
jQuery('#textMd5').closest('.form-group').hide();
Kind regards,
<js />
My AppGini Blog:
https://appgini.bizzworxx.de/blog
You can help us helping you:
Please always put code fragments inside
AppGini 24.10 Revision 1579 + all AppGini Helper tools
<js />
My AppGini Blog:
https://appgini.bizzworxx.de/blog
You can help us helping you:
Please always put code fragments inside
[code]...[/code]
blocks for better readabilityAppGini 24.10 Revision 1579 + all AppGini Helper tools
-
- Veteran Member
- Posts: 32
- Joined: 2021-06-12 21:01
Re: how to create MD5 field in appgini ?
thank you Sir.