Hello good morning... Could it be possible to ask for an answer to a security question, right after logging in with the username and password? Only the first time you log in?
I wanted to know if that would be possible in Appgini?
Thanks
Security question
Re: Security question
Hi Luis,
indeed you should be able to do so. After the login (in the __global.php -> login_ok) < you could check if the logged in user has not yet answered to a security question (this can be done by having a table to store all logins that already answered the question). If not answered, redirect the user to a page with a security question. Otherwise just continue.
On the security question page, upon successful completion, add this user to the table that you created to log all successful users that answered the security question .
Hope that gives a starting point.
indeed you should be able to do so. After the login (in the __global.php -> login_ok) < you could check if the logged in user has not yet answered to a security question (this can be done by having a table to store all logins that already answered the question). If not answered, redirect the user to a page with a security question. Otherwise just continue.
On the security question page, upon successful completion, add this user to the table that you created to log all successful users that answered the security question .
Hope that gives a starting point.
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.
Re: Security question
That's a perfect answer, @pböttcher!
I'd kindly like to add, AppGini provides PHP-functions
Anyway, it depends on your requirements if an additional table makes sense and could be used for more user specific configuration options or so.
If this was only that one setting (or only a couple of), personally I would go with
Just my 2 ¢
I'd kindly like to add, AppGini provides PHP-functions
getUserData()
and setUserData()
which allow us to store and retrieve user dependent settings without additional tables. Anyway, it depends on your requirements if an additional table makes sense and could be used for more user specific configuration options or so.
If this was only that one setting (or only a couple of), personally I would go with
getUserData()
/ setUserData()
.Just my 2 ¢
Kind regards,
<js />
My AppGini Blog:
https://appgini.bizzworxx.de/blog
You can help us helping you:
Please always put code fragments inside
AppGini 25.10 + 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 25.10 + all AppGini Helper tools