Info
- 13 posts
- 5 voices
- Started 2 years ago by chengdu living
- Latest reply from esteroizi
- This topic is resolved
Change the URL in registration e-mail
-
- Posted 2 years ago #
When users register on my bbPress installation, they receive a URL to login. Except the URL to login is the bbPress install location, not the URL of the bbPress install as it sits inside my WordPress site design. How can I change the URL in that e-mail?
If that wasn't clear, here's what I mean. The registration e-mail is forwarding users to http://www.chengduliving.com/bbpress but where I want them to go is http://www.chengduliving.com/forum
Thanks!
-
- Posted 2 years ago #
It's because your bbpress install is in a different directory than your WP
You can try copying this to .httaccess'
RewriteEngine onRewriteCond %{HTTP_HOST} ^([^.:]+\.)*chengduliving.com/bbpress\.?(:[0-9]*)?$ [NC]
RewriteRule ^(.*)$ http://www.chengduliving.com/forum/$1 [R=301,L]
'If that dosn't work try here:
http://en.wikipedia.org/wiki/URL_redirection -
- Posted 2 years ago #
Isn't it better to locate the file which is sending the data?
I will look into this as well.
-
- Posted 2 years ago #
I added that bit to .htaccess and it doesn't seem to have changed anything. Perhaps it takes time to take effect? Here's what my .htaccess looks like:
# BEGIN WordPress <IfModule mod_rewrite.c> RewriteEngine On RewriteBase / RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule . /index.php [L] </IfModule> RewriteEngine on RewriteCond %{HTTP_HOST} ^([^.:]+\.)*chengduliving.com/bbpress\.?(:[0-9]*)?$ [NC] RewriteRule ^(.*)$ http://www.chengduliving.com/forum/ [R=301,L] # END WordPress -
- Posted 2 years ago #
Any ideas on how to fix the link in that e-mail?
-
- Posted 2 years ago #
@chengdu living I tried locating the file, but didn't find it.
-
- Posted 2 years ago #
I'm still trying to fix this problem!! The URL redirection didn't work for me but I think a better fix would be to change what's output in the registration e-mail, if that's possible!
If anyone has a solution I'd be eternally grateful!
-
- Posted 2 years ago #
Have you looked at bb-includes/functions.bb-users.php?
In
function bb_send_pass( $user, $pass ) { if ( !$user = bb_get_user( $user ) ) return false; $message = __("Your username is: %1$s \nYour password is: %2$s \nYou can now log in: %3$s \n\nEnjoy!"); return bb_mail( bb_get_user_email( $user->ID ), bb_get_option('name') . ': ' . __('Password'), sprintf($message, $user->user_login, $pass, bb_get_uri(null, null, BB_URI_CONTEXT_TEXT)) ); }have you tried changing the
bb_get_uri(null, null, BB_URI_CONTEXT_TEXT)to your web address? -
- Posted 2 years ago #
Thanks for your help Tom,
How would I add my web address into that line? I tried the following but it gave me an error:
sprintf($message, $user->user_login, $pass, http://www.chengduliving.com/forum/)Thanks!!
-
- Posted 2 years ago #
Try putting quotes around your address.
i.e.
sprintf($message, $user->user_login, $pass, "http://www.chengduliving.com/forum/") -
- Posted 2 years ago #
That worked!
Thank you so much for your help, Tom!!!
:D :D :D
-
- Posted 2 years ago #
Glad I could help out.
Be aware that this is 'core hack'. If/when an upgrade comes out that will be overwritten.
-
- Posted 1 year ago #
Tom :D i want to thank you for your support
-
You must log in to post.