Info
- 9 posts
- 5 voices
- Started 5 years ago by mouse8b
- Latest reply from davidbessler
- This topic is resolved
Disallowing Registration
-
- Posted 5 years ago #
I have a site with bbPress and WordPress. They are all integrated to where if you log in to one location, you are logged into the others as well. I also have (well, am working on) a unified registration page where I ask for all needed information and write it to whichever database needs it. Since I have this, I need to have bbPress lose the ability to register. Should I just change register.php to inform the user to register on the main registration page, or is there a better way?
-
- Posted 5 years ago #
Maybe add
<php header("Location: path/to/your/page"); ?>
to the top of your bbpress registration template?Just a thought.
-
- Posted 5 years ago #
Sadly, by the time you get to the registration template, the user has already been added.
You could write a plugin that, during the
bb_inithook, checks to see if $_SERVER['REQUEST_URI'] matches the registration link and, if so, send a header("Location: http://blah.blah/my-reg.php"). -
- Posted 5 years ago #
This does make me think perhaps UserPress could be created as a separate user management project.
-
- Posted 5 years ago #
Forgive me if I misunderstand, but after looking at the source, could I not simply replace the registration form in bb-templates/register.php with a message and a link to my form? I don't see how the user could already be added when no information has been collected.
-
- Posted 5 years ago #
In the default template's register.php, I replaced the registration form with a message and link and it seems to have worked just fine. ( http://www.bandtr.com/wordpress/bbpress/ ). If there are some other factors at work that I am not aware of and need to know about, please let me know.
-
- Posted 5 years ago #
That works well. The only thing is that people can still manually POST their own data to your root/registration.php file. Just because you don't link to it anywhere doesn't mean it's gone :)
-
- Posted 5 years ago #
k, good to know. I think I will take my chances on that for now.
-
- Posted 5 years ago #
mouse8b, I had the same problem and used your solution. In addition, I commented out the registration link in the file login-form.php and saved it (along with my new registration.php) in my-templates so the modified template gets preserved through upgrades.
-cheers
-
You must log in to post.