Hi,
I’m in a bit of a pickle.
My website needs to be able to “[B]disable[B]de-activate
Actually, the link I put in my website is to “[B]Delete
But, from experience, I know that it is simply good practice to never completely erase a user’s account from your database. It’s best to simply disable it somehow, so the user can no longer log-in. But, the account itself should remain in the database archives, for various obvious reasons.
And, therein lies my dilemma.
I know how to delete an account using my PHP code (a simple MySQL Delete Query is all that’s needed). This is easy.
However, I have no idea how to disable/deactivate an account in a MySQL database, so that the user is no longer able to log into my website.
Extensive online searched have yielded nothing.
The only thing I was able to find was something about : [B]REVOKE PRIVILEGES for user “login”.
But, I wasn’t surprised when this did not work. It’s only server-side. It’s not possible to revoke privileges that were never [B]GRANTED
Any idea what sort of code I would need to disable/de-activate a user’s account in PHP ?
Thanks