Search Results for 'logout redirect'
-
AuthorSearch Results
-
November 17, 2010 at 7:17 am #98475
In reply to: login-redirect – BP Profile as Homepage ( broken? )
nit3watch
Participant@shawnyuan ** when user log into your website, user is redirected to his/her profile. ** when user tries to move to homepage, user is redirected to his/her profile. **
Here’s the BP Profile as Homepage plug-in:
function bp_profile_homepage()
{
global $bp;
if(is_user_logged_in() && $_SERVER=='/')
{
wp_redirect( $bp->loggedin_user->domain );
}
}
function logout_redirection()
{
global $bp;
$redirect = $bp->root_domain;
wp_logout_url( $redirect );
}
add_filter('get_header','bp_profile_homepage',1);
add_action('wp_logout','logout_redirection');
October 28, 2010 at 12:53 pm #96796In reply to: sub domain problem
emailaya
Memberone problem down, 2 new ones:
now blog.emailaya.com works!
BUT http://www.emailaya.com/blog doesnt!
it brings me to a page saying: Page Not Found – The page you were looking for was not found.2nd: if i logout the user that is currently logged in im redirected to my homepage! instead of the blog’s homepage “/blog/”
doubled URL problem was solved through the wp->settings->permalinks
October 13, 2010 at 2:13 am #95012In reply to: BuddyPress Mobile Theme
Sofian J. Anom
ParticipantNow the activity as the home page is working, and the logout button is also displayed after login. Another problem is the blog page/tab can not display the list of blog posts. He even displays a list of blogs because I named the page/tab “Blog”. Login form on the front page also does not work: every time I login always redirected to the wp-login.
September 14, 2010 at 2:59 pm #92409In reply to: custom logout redirect
September 2, 2010 at 6:07 am #91287In reply to: Error on logout
@mercime
ParticipantUsual suspects or redirection issue, see – https://codex.wordpress.org/FAQ_Troubleshooting#How_do_I_solve_the_Headers_already_sent_warning_problem.3F
August 27, 2010 at 3:26 pm #90574In reply to: Changing target of ‘register’ link on login page
footybible
ParticipantThanks @rogercoathup I’m not sure line 368 is the right place though (its currently blank in my login). Here is what my file looks like from line 353 onwards:
// allow plugins to override the default actions, and to add extra actions if they want
do_action(‘login_form_’ . $action);$http_post = (‘POST’ == $_SERVER);
switch ($action) {case ‘logout’ :
check_admin_referer(‘log-out’);
wp_logout();$redirect_to = !empty( $_REQUEST ) ? $_REQUEST : ‘wp-login.php?loggedout=true’;
wp_safe_redirect( $redirect_to );
exit();break;
case ‘lostpassword’ :
case ‘retrievepassword’ :
if ( $http_post ) {
$errors = retrieve_password();
if ( !is_wp_error($errors) ) {
$redirect_to = !empty( $_REQUEST ) ? $_REQUEST : ‘wp-login.php?checkemail=confirm’;
wp_safe_redirect( $redirect_to );
exit();
}
}July 21, 2010 at 10:29 am #86445In reply to: How to customize Login and Logout pages ?
sicksight
ParticipantYou could use this snippet in your functions.php to redirect the user to the homepage: http://pastebin.com/VPfgZZTu
You could cutomize the code to your wishes!July 21, 2010 at 12:43 am #86405In reply to: How to customize Login and Logout pages ?
abcde666
Participantmany thanks for your feedback guys !
Does anyone have an idea of how to do a re-direct ? No clue about that and where to redirect at all ?
Please help….
June 26, 2010 at 1:19 am #82896In reply to: essential core features
peterverkooijen
ParticipantI agree…
There are login redirect plugins (bpdev-logout-redirect + bp-redirect-to-profile). I’ve integrated them into my theme. User/member management is fatally underdeveloped.
May 17, 2010 at 11:02 am #78485In reply to: BP-FBConnect not working with buddypress 1.2.3
kagliostro
MemberInstead for me it’s the only one that works very very well (and I have tried wp-fb-autocnnect, Gygia, simple fb connect, Facebook Connect to Adam Hupp, Faux Facebook Connect -only for comment- and others)!
The only ones that work (for me) are Gygia (but only if you have a normal WordPress installation) and BP-Facebook connect (there is a very little problem with logout redirect). And more, Bp-Facebook gets also the (facebook) email of user.
I don’t love its method to work, but it works.I have Buddypress 1.2.3 and WordPress 3.0 beta 1 (network installation with subdirectory).
The very great problem that I have with Bp-Facebook (at the moment) is the incompatibility with WordPress MU Domain Mapping: if my secondary blog mantains subdirectory url, BP-facebook works (too well).
But if I change a subdirectory url with a primary url (example.com/secondaryblog to secondaryblog.com) it goes crazy.
And this is a problem!I hope Peatling update his plugin!
April 6, 2010 at 7:34 pm #72062In reply to: Custom Login Page in BuddyPress
Brajesh Singh
ParticipantIt will redirect back to home page if you are logged in as a logged in member should not be able to access that page.
Try to logout and then visit that page.
April 4, 2010 at 4:51 am #71657In reply to: Redirecting to profile page after login
peterverkooijen
Participantadd_filter("login_redirect","bpdev_redirect_to_profile",10,3);
function bpdev_redirect_to_profile($redirect_to_calculated,$redirect_url_specified,$user)
{
if(empty($redirect_to_calculated))
$redirect_to_calculated=admin_url();
/*if the user is not site admin,redirect to his/her profile*/
if(!is_site_admin($user->user_login))
return bp_core_get_user_domain($user->ID );
else
return $redirect_to_calculated; /*if site admin or not logged in,do not do anything much*/
}I put it in bp-custom.php. Probably also works in functions.php.
He also has this essential logout redirect to homepage plugin. Both should have been default wp/bp behavior imho.
February 22, 2010 at 9:29 pm #64900dwdutch
ParticipantThanks, David. I’ll pursue these options then let you know what happens.
As for login, Id like to use the “Login with Ajax” widget because it has a “Forgot password” option and it allows for redirects to custom URL on login and/or logout. I’d like to stay away from the WP screen, if possible.
In fact, that’s yet another challenge: how to give them access to create Posts without seeing the WP-admin screens — especially since I want any profile changes to be done via BP (so they’ll see their xprofile fields) rather than the more simplistic WP fields. alas… for now, i need to get some of them started and I’ll have to save that battle for another day.
This blog is for a private group of about 20 people.
February 14, 2010 at 6:45 pm #63376In reply to: Login section ideas & questions
Bowe
ParticipantSorry for the tripple post.. the correct logout redirection is:
<?php echo wp_logout_url(site_url() ); ?>February 14, 2010 at 5:50 pm #63369In reply to: Login section ideas & questions
Bowe
ParticipantOw and you can solve the logout redirect like this:
http://themysite.com/wp-login.php?action=logout&redirect_to=http://mysite.com
August 30, 2009 at 5:07 pm #51775In reply to: Replace WP profile edit with BP profile edit
peterverkooijen
ParticipantI’ve copied all code from wp-login.php to a custom wp page in my template called memberlogin.php at mywebsite.com/login. I had to make this edit to make the login form show up at that address:
require( '././wp-load.php' );Unfortunately, the form is broken, so there must be other addresses in the file that require editing…
EDIT 1: There’s an obvious culprit:
<form name="lostpasswordform" id="lostpasswordform" action="<?php echo site_url('wp-login.php?action=lostpassword', 'login_post') ?>" method="post">Replaced all instances of ‘wp-login.php’ with ‘login’. Will all the code work without the php?
Yes! Logging in via this form works.
Unfortunately logging out does NOT work…

When I try /login?action=logout directly in the browser address bar I get this:
You are attempting to log out of Your Site
Do you really want to log out?
After confirming the message bar says ‘failure noticed’ and I’m redirected to the homepage, still logged-in.
Apparently those ?actions don’t get taken along with the redirect. The redirect is just a blunt redirect to the /login and there it ends.
August 15, 2009 at 9:28 am #51043In reply to: problem with using the home theme as a user theme
Korhan Ekinci
ParticipantOk Kunal replace this part:
<?php
if ( function_exists('wp_logout_url') ) {
$logout_link = '/ <a href="' . wp_logout_url( $bp->root_domain ) . '">' . __( 'Log Out', 'buddypress' ) . '</a>';
} else {
$logout_link = '/ <a href="' . $bp->root_domain . '/wp-login.php?action=logout&redirect_to=' . $bp->root_domain . '">' . __( 'Log Out', 'buddypress' ) . '</a>';
}
echo apply_filters( 'bp_logout_link', $logout_link );
?>With This:
<a href="<?php echo wp_logout_url( get_permalink() ); ?>" title="Logout">Logout</a>And that should solve the logout issue.
August 15, 2009 at 7:09 am #51039In reply to: problem with using the home theme as a user theme
Kunal17
ParticipantI was trying to figure out why the log in form was not showing up at all.
Replacing
<?php elseif ( get_option(‘users_can_register’) ) : ?>
with
<?php else
/if ( get_option(‘users_can_register’) ) : ?>seems to do the trick. Not sure why the get_option code does not work. Do I need to have that check?
Still trying to figure out how to redirect to the same page on logout.
August 15, 2009 at 6:47 am #51037In reply to: problem with using the home theme as a user theme
Kunal17
ParticipantKorhan,
I tried the code you provided:
If I browse to my p2 user blog while logged out, it does not show me anything in the userbar. I would like to provide the user the option to log in from the user blog itself. Is the code supposed to show the BP log in/signup links in the userbar?
If I browse to my p2 user blog while logged in, it shows the user avatar, member profile link and logout link. If I click the logout link, it takes me to the standard WP login page with the message ‘you are logged out’. Can you suggest a way to have it redirect to the same page on the userblog frontend except with the user logged out?
I hope I am being clear about my questions. I am a novice at programming so only have a basic understanding of what the code is doing.
Thanks again for your help.
August 13, 2009 at 4:43 pm #50973In reply to: problem with using the home theme as a user theme
Korhan Ekinci
ParticipantFor some how the code above did not go through correcty, I will paste the first part again:
<div id="search-login-bar">
<?php if ( is_user_logged_in() ) : ?>
<div id="logout-link">
<?php bp_loggedinuser_avatar_thumbnail( 20, 20 ) ?>
<?php bp_loggedinuser_link() ?>
<?php
if ( function_exists('wp_logout_url') ) {
$logout_link = '/ <a href="' . wp_logout_url( $bp->root_domain ) . '">' . __( 'Log Out', 'buddypress' ) . '</a>';
} else {
$logout_link = '/ <a href="' . $bp->root_domain . '/wp-login.php?action=logout&redirect_to=' . $bp->root_domain . '">' . __( 'Log Out', 'buddypress' ) . '</a>';
}
echo apply_filters( 'bp_logout_link', $logout_link );
?>
<?php do_action( 'bp_login_bar_logged_in' ) ?>
</div>
<?php elseif ( get_option('users_can_register') ) : ?>
<form name="login-form" id="login-form" action="<?php echo $bp->root_domain . '/wp-login.php' ?>" method="post">
<input type="text" name="log" id="user_login" value="<?php _e( 'Username', 'buddypress' ) ?>" onfocus="if (this.value == '<?php _e( 'Username', 'buddypress' ) ?>') {this.value = '';}" onblur="if (this.value == '') {this.value = '<?php _e( 'Username', 'buddypress' ) ?>';}" />
<input type="password" name="pwd" id="user_pass" class="input" value="" />
<input type="checkbox" name="rememberme" id="rememberme" value="forever" title="<?php _e( 'Remember Me', 'buddypress' ) ?>" />
<input type="submit" name="wp-submit" id="wp-submit" value="<?php _e( 'Log In', 'buddypress' ) ?>"/>
<input type="button" name="signup-submit" id="signup-submit" value="<?php _e( 'Sign Up', 'buddypress' ) ?>" onclick="location.href='<?php echo bp_signup_page() ?>'" />
<input type="hidden" name="redirect_to" value="http://<?php echo $_SERVER['SERVER_NAME'] . $_SERVER['REQUEST_URI'] ?>" />
<input type="hidden" name="testcookie" value="1" />
<?php do_action( 'bp_login_bar_logged_out' ) ?>
</form>
<?php endif // get_option('users_can_register') ?>
<div class="clear"></div>
</div>August 13, 2009 at 4:40 pm #50972In reply to: problem with using the home theme as a user theme
Korhan Ekinci
ParticipantHi Kunal17, I use prologue theme as default user theme and I also wanted to keep the login form on top, so I added this to the header of the prologue theme:
<div id=”search-login-bar”>
<?php if ( is_user_logged_in() ) : ?>
<div id=”logout-link”>
<?php bp_loggedinuser_avatar_thumbnail( 20, 20 ) ?>
<?php bp_loggedinuser_link() ?>
<?php
if ( function_exists(‘wp_logout_url’) ) {
$logout_link = ‘/ root_domain ) . ‘”>’ . __( ‘Log Out’, ‘buddypress’ ) . ‘‘;
} else {
$logout_link = ‘/ root_domain . ‘/wp-login.php?action=logout&redirect_to=’ . $bp->root_domain . ‘”>’ . __( ‘Log Out’, ‘buddypress’ ) . ‘‘;
}
echo apply_filters( ‘bp_logout_link’, $logout_link );
?>
<?php do_action( ‘bp_login_bar_logged_in’ ) ?>
</div>
<?php elseif ( get_option(‘users_can_register’) ) : ?>
<form name=”login-form” id=”login-form” action=”<?php echo $bp->root_domain . ‘/wp-login.php’ ?>” method=”post”>
<input type=”text” name=”log” id=”user_login” value=”<?php _e( ‘Username’, ‘buddypress’ ) ?>” onfocus=”if (this.value == ‘<?php _e( ‘Username’, ‘buddypress’ ) ?>’) {this.value = ”;}” onblur=”if (this.value == ”) {this.value = ‘<?php _e( ‘Username’, ‘buddypress’ ) ?>’;}” />
<input type=”password” name=”pwd” id=”user_pass” class=”input” value=”” />
<input type=”checkbox” name=”rememberme” id=”rememberme” value=”forever” title=”<?php _e( ‘Remember Me’, ‘buddypress’ ) ?>” />
<input type=”submit” name=”wp-submit” id=”wp-submit” value=”<?php _e( ‘Log In’, ‘buddypress’ ) ?>”/>
<input type=”button” name=”signup-submit” id=”signup-submit” value=”<?php _e( ‘Sign Up’, ‘buddypress’ ) ?>” onclick=”location.href='<?php echo bp_signup_page() ?>'” />
<input type=”hidden” name=”redirect_to” value=”http://<?php echo $_SERVER[‘SERVER_NAME’] . $_SERVER[‘REQUEST_URI’] ?>” />
<input type=”hidden” name=”testcookie” value=”1″ />
<?php do_action( ‘bp_login_bar_logged_out’ ) ?>
</form>
<?php endif // get_option(‘users_can_register’) ?>
<div class=”clear”></div>
</div>
You can maybe replace the
<div id=”search-login-bar”>
<?php bp_login_bar() ?>
<div class=”clear”></div>
</div>
part of your header.php file with the first code and I hope it will work for you.
April 14, 2009 at 5:01 am #42589In reply to: Required name and logout issues
vito687
ParticipantIm having this same logout problem, logout redirects right back to the page where you were and you stay logged in? im on the latest branch of WPMU and latest TRUNK of BP
March 9, 2009 at 6:13 am #39526In reply to: BP-FBConnect Plugin
clompers
MemberThe test site is acting a bit odd when I login with my Facebook account. It thinks my profile is http://testbp.org/members/facebookuser/ which belongs to a Trent Adams. Trying to view settings redirects back to http://testbp.org/members/facebookuser/, as does trying to logout through the top grey toolbar.
I’ve restricted my facebook profile quite a bit so maybe its relying on information facebook isn’t providing.
February 8, 2009 at 1:33 pm #37473In reply to: Required name and logout issues
Sgrunt
Participanti’ve re uploaded just now all bp. Nothing change…i’d like to understand where to modify the logout url, removing the redirect.
I’ve tried changing the templatetags in bpcore but it sorts no changes.
note: every time i try to paste the link url here in the forum, the post don’t go published
February 7, 2009 at 4:48 pm #37421In reply to: Required name and logout issues
Sgrunt
Participantno…i don’t understand where to change the redirect url. I’m using the beta 2 version with no trunk mixed in
-
AuthorSearch Results