admin area, deactivate/reactivate account?
Hey folks =)
Hope all is well.
When making an admin area i have always just allowed 'delete the user', but is it possible to deactivate and reactivate a username and password.
I can picture it in my noggin. when viewing all the users there is the ability to check a box selecting deactive or reactivate depending on the state of the username at the time.
What do you think, is it more hassle than its worth to allow this?
Any thoughts is much appreciated.
thanks in advance,
This is better way than deleteing a user permanently, have an extra field in database that whether a user is activa or inactive, and admin can update this anytime, to make active or inactive....
Find Tutors Easyway to get connect with your tutor in india
excellent, thanks =)
I've never coded this before by any happy chance could you break down exactly how i would do this...
as you said the database would have an extra field.... would the code be simply an if statement..
if inactive redirect user to page 'this login is disabled'
else let user in.
must admit, it is sounding like a pretty nifty wee function.
Yes you can do this easily.
For this functionality,
You have to add an extra field in DB as said.
This field should be BIT type which will accept only 2 values. True or False.
and you have to set it accordingly...
If user is disabled then set it to 0 Else 1.