PDA

View Full Version : Deactivate user account temporarily


Thomas P
09-04-2001, 08:58 AM
Hi there,
someone ever came accross the idea to temporarily deactivate a member's account - would be helpful occassionally ;)
-Tom

Admin
09-04-2001, 10:50 AM
Just create a new usergroup, with no post-permissions.

Thomas P
09-04-2001, 01:16 PM
Hi FireFly,
thanks for the kick in the butt! ;)
Sure, that's the best way, so I just create a group "Arrest" with no post-permission and may play with the error-message to state the current status of the user...
Just another quick question :D Would it be hard to create an extra error message for this user group "You're under posting arrest, please wait a week and be a little more friendly in the future"?
Thanks, your fast replies are as always greatly appreciated,
-Tom

Admin
09-04-2001, 02:34 PM
Kicking people in the butt is always fun. :D

About the error message, it shouldn't be too hard.
Take a look at functions.php, find this:
if ($bbuserinfo[userid]==0) {
eval("standarderror(\"".gettemplate("error_nopermission_loggedout")."\");");
} else {
eval("standarderror(\"".gettemplate("error_nopermission_loggedin")."\");");
}
change it to
if ($bbuserinfo[userid]==0) {
eval("standarderror(\"".gettemplate("error_nopermission_loggedout")."\");");
} elseif ($bbuserinfo[usergroupid]==555) {
eval("standarderror(\"".gettemplate("error_nopermission_arrested")."\");");
} else {
eval("standarderror(\"".gettemplate("error_nopermission_loggedin")."\");");
}
but change 555 to the usergroup of the arrested, and also create a template named error_nopermission_arrested.

Yup, that should work. :)

Thomas P
09-04-2001, 04:54 PM
Thanks a bunch, great, very clean solution - thanks! :)
You should become an IT teacher/trainer, since you can make things very clear ;)
-Tom

Admin
09-04-2001, 05:05 PM
So it worked... cool. :p

There's one "bug" in this though. If a user tries to get to some kind of admin. options, he'll get a "You are arrested punk!" message. If you care so much I'll try to fix it.

Thomas P
09-05-2001, 06:45 AM
Yeah, worked instantly very well! https://vborg.vbsupport.ru/

I lost you here, how could that happen?
If you don't mind, I would like to hear how to solve a potential problem :)

Cheers pal for your help on this

Admin
09-05-2001, 10:26 AM
How could that happen? Very easily:

A user tries to edit another's post.
If he is not logged in, he will get the "No permissions not logged in" message.
If he is logged in, and under arrest, he will get the "You are under arrest man" message.
Else, he will get the "No permissions logged in" message.

Got it?

Thomas P
09-05-2001, 10:36 AM
Originally posted by FireFly
If he is logged in, and under arrest, he will get the "You are under arrest man" message.
Else, he will get the "No permissions logged in" message.


Well, that's fine, isn't it?


Got it?

Not sure :D
thx,
-Tom

Admin
09-05-2001, 10:42 AM
I guess it's fine... but just make sure you add all of the other options that the regular nopermission templates have.
Just add something for the arrested part.

Hey, if it's good for you, it's sure good for me. :)