[request-help] Add/Insert a value to a user's table upon registration

Hello folks,
I’m a newbie and quite new to Lua.

I’m wondering if someone is willing to help me create a VERY small script or modify my existing esx_identity to automatically add a value to ‘last digits’ column in the users database upon registration.

Explanation:
I’m using esx_identity for players to register, but I want to add a functionnality used in jsfour-identity which adds another value to the users table called ‘last digits’. This function adds a 4 digits number to the user’s info.

More explanation:
I really don’t want to use jsfour-identity as I’m satisfied with my current UI modified esx_identity, but I need the last digits column for other scripts that require a ‘login code’.

Obviously before posting here, I have tried to modify the scripts by myself but failed several times, and thus asking for help here. One of the problems I faced is that esx_identity gives players a new ‘last digits’ everytime they join the game, even if they registered before. (I know it’s a programming logic issue, but I couldn’t figure it out)

Thanks for your time.

If you need a login code which gets created upon player registration and doesn’t change afterwards, you should add it in your main player handler (mostly essentialmode / es_extended), where it creates a new user in your database.