Page 1 of 1
Idiots signing up
Posted: Sun Apr 15, 2007 1:04 pm
by faceless
Last night there was someone called "hindiboy22" who signed up and posted links to porn etc. This was an accident as the wee snider got round my "security"... Whenever I add new members I have to use a separate file than the normal "profile.php" to sign them up and I'd forgotten to change it back to the one that's in use normally. So it was my fault really, but it just goes to show that it's necessary.
It makes me wonder how many other arseholes like that have tried to sign up and then been hit with a wall they can't get through. It also makes me laugh though, haha. If anyone else running a phpbb forum wants to know how to do it, let me know and I'll show you. It does mean a bit of work manually creating the accounts, but it's a lot less work than having to clean up after spambots and tosspots like hindiboy22. Thanks to Skylace for cleaning up last night and banning the fool...
Posted: Sun Apr 15, 2007 1:24 pm
by Lostinthestates
Thanks for that! I was wondering how you managed to avoid that happening more often.
Posted: Sun Apr 15, 2007 3:38 pm
by nekokate
Actually I have a phpBB2 forum and I'd love to know how to do that, if it's not too much trouble, Face - I'm deleting about 5 or 6 SPAM accounts a day at the moment.
Posted: Sun Apr 15, 2007 4:16 pm
by faceless
ok, here's what to do -
1. open your profile.php in an editor but before you do anything else save it again as say "profile-open.php", as you will need two separate files for this.
2. go to line 84 where you'll see this:
else if ( $mode == 'editprofile' || $mode == 'register' )
you should edit it to just like this:
else if ($mode == 'editprofile')
then save the file as profile.php. Uppload both files to your FTP and it will now locked against new signups. To allow new signups you need to do this:
1. Change the register link that is in the file "overall_header.tpl" which is in your /templates/yourtheme folder at around line 270. As you can see when you click on the register link here it just goes to a simple page that I made which asks people to send an email from an ISP mail account to register.
2. Once people have done that and you want to allow their account, go to your FTP and rename the profile.php file to say "profile-closed.php" and rename the untouched "profile-open.php" file to "profile.php". You can then register the people (I usually do it once a week) pretty quickly by going to
Code: Select all
https://yoursite.com/profile.php?mode=register&agreed=true
. As soon as you've registered the new people rename the profile.php file back to something that you can recognise and rename the profile-closed.php file back to profile.php.
It might sound a bit tricky at first, but once you've got it sorted it's pretty easy (unless you forget to lock things up after you've sorted new accounts as I've done a few times now)
note: don't use the suggestions for filenames that I've mentioned here... pick your own for safety's sake.
Posted: Sun Apr 15, 2007 4:37 pm
by nekokate
Very cool. Thanks, I'll have a toy around with that and see what happens

Posted: Sun Apr 15, 2007 5:58 pm
by major.tom
I like scripting, and since I hate renaming files manually (and it's subject to human error), I would create a couple scripts to achieve this without having to do so manually:
First, create a couple permanent backups of your current profile.php
Code: Select all
cp profile.php profile-with-register.php
cp profile.php profile-without-register.php
Then manually edit profile-without-register.php as faceless said...
Then create 2 scripts, something like this:
vi register-on.sh
Code: Select all
!/bin/sh
cp profile-with-regisher.php profile.php
vi rigister-off.sh
Code: Select all
!/bin/sh
cp profile-without-register.php register.php
...and make them executable (by you only):
Code: Select all
chmod 750 register-on.sh
chmod 750 register-off.sh
Then don't forget to run register-off.sh the 1st time.
Saves alot of manual editing.
