<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: Buddypress trick:Redirect Users to their profile on login</title>
	<atom:link href="http://buddydev.com/buddypress/buddypress-trick-redirect-users-to-their-profile-on-login/feed/" rel="self" type="application/rss+xml" />
	<link>http://buddydev.com/buddypress/buddypress-trick-redirect-users-to-their-profile-on-login/</link>
	<description>Just another Buddydev.com weblog</description>
	<lastBuildDate>Tue, 07 Feb 2012 03:37:18 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.4</generator>
	<item>
		<title>By: Brajesh Singh</title>
		<link>http://buddydev.com/buddypress/buddypress-trick-redirect-users-to-their-profile-on-login/comment-page-1/#comment-25676</link>
		<dc:creator>Brajesh Singh</dc:creator>
		<pubDate>Wed, 02 Nov 2011 18:47:12 +0000</pubDate>
		<guid isPermaLink="false">http://buddydev.com/?p=88#comment-25676</guid>
		<description>Hi Alan,
sorry the above code is not about detecting if the user is siteadmin/group admin. You can check it by using is_super_admin and  also you will need to check like the code here(for finding if user is admin of any group)
http://pastebin.com/LZud06Rv</description>
		<content:encoded><![CDATA[<p>Hi Alan,<br />
sorry the above code is not about detecting if the user is siteadmin/group admin. You can check it by using is_super_admin and  also you will need to check like the code here(for finding if user is admin of any group)<br />
<a href="http://pastebin.com/LZud06Rv" rel="nofollow">http://pastebin.com/LZud06Rv</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: alanchrishughes</title>
		<link>http://buddydev.com/buddypress/buddypress-trick-redirect-users-to-their-profile-on-login/comment-page-1/#comment-22960</link>
		<dc:creator>alanchrishughes</dc:creator>
		<pubDate>Thu, 13 Oct 2011 21:05:39 +0000</pubDate>
		<guid isPermaLink="false">http://buddydev.com/?p=88#comment-22960</guid>
		<description>I&#039;m just trying to figure out the code I would need to determine if a user is an admin or group admin, and if so display ABC set of links, but if not display XYZ set of links. I&#039;ve been playing around with the code here a bit but no luck.</description>
		<content:encoded><![CDATA[<p>I&#8217;m just trying to figure out the code I would need to determine if a user is an admin or group admin, and if so display ABC set of links, but if not display XYZ set of links. I&#8217;ve been playing around with the code here a bit but no luck.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Brajesh Singh</title>
		<link>http://buddydev.com/buddypress/buddypress-trick-redirect-users-to-their-profile-on-login/comment-page-1/#comment-21353</link>
		<dc:creator>Brajesh Singh</dc:creator>
		<pubDate>Tue, 27 Sep 2011 16:42:22 +0000</pubDate>
		<guid isPermaLink="false">http://buddydev.com/?p=88#comment-21353</guid>
		<description>Hi Ron,
if you use this version from the github, you won&#039;t need to edit.
https://github.com/sbrajesh/bp-redirect-to-profile

The is_site_Admin is deprecated and we now use is_super_admin() in place of that.

Thanks
Brajesh</description>
		<content:encoded><![CDATA[<p>Hi Ron,<br />
if you use this version from the github, you won&#8217;t need to edit.<br />
<a href="https://github.com/sbrajesh/bp-redirect-to-profile" rel="nofollow">https://github.com/sbrajesh/bp-redirect-to-profile</a></p>
<p>The is_site_Admin is deprecated and we now use is_super_admin() in place of that.</p>
<p>Thanks<br />
Brajesh</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ron</title>
		<link>http://buddydev.com/buddypress/buddypress-trick-redirect-users-to-their-profile-on-login/comment-page-1/#comment-21301</link>
		<dc:creator>Ron</dc:creator>
		<pubDate>Tue, 27 Sep 2011 01:03:39 +0000</pubDate>
		<guid isPermaLink="false">http://buddydev.com/?p=88#comment-21301</guid>
		<description>Well this is what worked for me i Downloaded it ran into a few errors.
This is what fixed it all so it works great hope it helps people in the future.
Keep the good work up.

&lt;?php
/*
Plugin Name: BP Redirect to Profile for Buddypress
Description:Redirect user to their profile when they login
Version: 1.1
Requires at least: BuddyPress 1.1
Tested up to: BuddyPress 1.2+wpmu 2.9.1
License: GNU General Public License 2.0 (GPL) http://www.gnu.org/licenses/gpl.html
Author: Brajesh Singh
Author URI: http://buddydev.com
Plugin URI:http://buddydev.com/buddypress/bp-redirect-to-profile-plugin-redirect-users-to-their-profile-on-login-on-buddypress-sites/
Last updated:16th feb 2010
*/
/***
    Copyright (C) 2009 Brajesh Singh(buddydev.com)

    This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3 of the License, or  any later version.

    This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
   
    You should have received a copy of the GNU General Public License along with this program; if not, see .

/*Add a filter to filter the redirect url for login*/

add_filter(&quot;login_redirect&quot;,&quot;bpdev_redirect_to_profile&quot;,100,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-&gt;user_login))
		return bp_core_get_user_domain($user-&gt;ID );
	else
		return $redirect_to_calculated; /*if site admin or not logged in,do not do anything much*/

}
if ( !function_exists( &#039;is_site_admin&#039; ) ) :
  function is_site_admin() {
    return is_super_admin();
  }
endif;
?&gt;</description>
		<content:encoded><![CDATA[<p>Well this is what worked for me i Downloaded it ran into a few errors.<br />
This is what fixed it all so it works great hope it helps people in the future.<br />
Keep the good work up.</p>
<p>&lt;?php<br />
/*<br />
Plugin Name: BP Redirect to Profile for Buddypress<br />
Description:Redirect user to their profile when they login<br />
Version: 1.1<br />
Requires at least: BuddyPress 1.1<br />
Tested up to: BuddyPress 1.2+wpmu 2.9.1<br />
License: GNU General Public License 2.0 (GPL) <a href="http://www.gnu.org/licenses/gpl.html" rel="nofollow">http://www.gnu.org/licenses/gpl.html</a><br />
Author: Brajesh Singh<br />
Author URI: <a href="http://buddydev.com" rel="nofollow">http://buddydev.com</a><br />
Plugin URI:http://buddydev.com/buddypress/bp-redirect-to-profile-plugin-redirect-users-to-their-profile-on-login-on-buddypress-sites/<br />
Last updated:16th feb 2010<br />
*/<br />
/***<br />
    Copyright (C) 2009 Brajesh Singh(buddydev.com)</p>
<p>    This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3 of the License, or  any later version.</p>
<p>    This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.</p>
<p>    You should have received a copy of the GNU General Public License along with this program; if not, see .</p>
<p>/*Add a filter to filter the redirect url for login*/</p>
<p>add_filter(&#8220;login_redirect&#8221;,&#8221;bpdev_redirect_to_profile&#8221;,100,3);</p>
<p>function bpdev_redirect_to_profile($redirect_to_calculated,$redirect_url_specified,$user)<br />
{<br />
if(empty($redirect_to_calculated))<br />
	$redirect_to_calculated=admin_url();</p>
<p>	/*if the user is not site admin,redirect to his/her profile*/<br />
	if(!is_site_admin($user-&gt;user_login))<br />
		return bp_core_get_user_domain($user-&gt;ID );<br />
	else<br />
		return $redirect_to_calculated; /*if site admin or not logged in,do not do anything much*/</p>
<p>}<br />
if ( !function_exists( &#8216;is_site_admin&#8217; ) ) :<br />
  function is_site_admin() {<br />
    return is_super_admin();<br />
  }<br />
endif;<br />
?&gt;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Brajesh Singh</title>
		<link>http://buddydev.com/buddypress/buddypress-trick-redirect-users-to-their-profile-on-login/comment-page-1/#comment-17816</link>
		<dc:creator>Brajesh Singh</dc:creator>
		<pubDate>Mon, 25 Jul 2011 20:02:25 +0000</pubDate>
		<guid isPermaLink="false">http://buddydev.com/?p=88#comment-17816</guid>
		<description>Hi,
disable the plugin and use this code

https://gist.github.com/1105039

either in bp-custom.php or in functions.php of your theme. Hope that helps.</description>
		<content:encoded><![CDATA[<p>Hi,<br />
disable the plugin and use this code</p>
<p><a href="https://gist.github.com/1105039" rel="nofollow">https://gist.github.com/1105039</a></p>
<p>either in bp-custom.php or in functions.php of your theme. Hope that helps.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Tazek joker</title>
		<link>http://buddydev.com/buddypress/buddypress-trick-redirect-users-to-their-profile-on-login/comment-page-1/#comment-17750</link>
		<dc:creator>Tazek joker</dc:creator>
		<pubDate>Sun, 24 Jul 2011 06:20:55 +0000</pubDate>
		<guid isPermaLink="false">http://buddydev.com/?p=88#comment-17750</guid>
		<description>Hi Brajesh, I wrote something wrong. The last line is:
- Always redirect the user to http://www.tazek.com/private/ after the log-on process.</description>
		<content:encoded><![CDATA[<p>Hi Brajesh, I wrote something wrong. The last line is:<br />
- Always redirect the user to <a href="http://www.tazek.com/private/" rel="nofollow">http://www.tazek.com/private/</a> after the log-on process.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Tazek joker</title>
		<link>http://buddydev.com/buddypress/buddypress-trick-redirect-users-to-their-profile-on-login/comment-page-1/#comment-17749</link>
		<dc:creator>Tazek joker</dc:creator>
		<pubDate>Sun, 24 Jul 2011 06:18:57 +0000</pubDate>
		<guid isPermaLink="false">http://buddydev.com/?p=88#comment-17749</guid>
		<description>Hi Brajesh,

Suppose that my website URL is: www.tazek.com.

If a non-logged user visit this URL, then I want to display only the public content and also links to login form and register form.

If a logged user visit this URL, then I want to redirect him to www.tazek.com/private/, then I want to display the private content.

I don&#039;t know how to:
- Check if the user is logged and redirect him to the private website (www.tazek.com/private) if he&#039;s logged;
- Check if the user is logged and redirect him to the public website (www.tazek.com) if he isn&#039;t logged;
- Always redirect the user to www.tazek.com/private/ the log-on process.


Thank you!</description>
		<content:encoded><![CDATA[<p>Hi Brajesh,</p>
<p>Suppose that my website URL is: <a href="http://www.tazek.com" rel="nofollow">http://www.tazek.com</a>.</p>
<p>If a non-logged user visit this URL, then I want to display only the public content and also links to login form and register form.</p>
<p>If a logged user visit this URL, then I want to redirect him to <a href="http://www.tazek.com/private/" rel="nofollow">http://www.tazek.com/private/</a>, then I want to display the private content.</p>
<p>I don&#8217;t know how to:<br />
- Check if the user is logged and redirect him to the private website (www.tazek.com/private) if he&#8217;s logged;<br />
- Check if the user is logged and redirect him to the public website (www.tazek.com) if he isn&#8217;t logged;<br />
- Always redirect the user to <a href="http://www.tazek.com/private/" rel="nofollow">http://www.tazek.com/private/</a> the log-on process.</p>
<p>Thank you!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Brajesh Singh</title>
		<link>http://buddydev.com/buddypress/buddypress-trick-redirect-users-to-their-profile-on-login/comment-page-1/#comment-17733</link>
		<dc:creator>Brajesh Singh</dc:creator>
		<pubDate>Sun, 24 Jul 2011 02:02:52 +0000</pubDate>
		<guid isPermaLink="false">http://buddydev.com/?p=88#comment-17733</guid>
		<description>Hi Tazek,
what will be the urls for the logged in user/non logged in user, I mean you will be using something like site.com/abc for logged in or non logged in, please let me know in a little detail and I will put the code.

Thanks
Brajesh</description>
		<content:encoded><![CDATA[<p>Hi Tazek,<br />
what will be the urls for the logged in user/non logged in user, I mean you will be using something like site.com/abc for logged in or non logged in, please let me know in a little detail and I will put the code.</p>
<p>Thanks<br />
Brajesh</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Tazek Joker</title>
		<link>http://buddydev.com/buddypress/buddypress-trick-redirect-users-to-their-profile-on-login/comment-page-1/#comment-17715</link>
		<dc:creator>Tazek Joker</dc:creator>
		<pubDate>Sat, 23 Jul 2011 12:26:56 +0000</pubDate>
		<guid isPermaLink="false">http://buddydev.com/?p=88#comment-17715</guid>
		<description>Hi Brajesh,

I&#039;d like to have two different home pages: one for logged users and other for non-logged users. What I have to change in your code to redirect the user to a specific the home page for logged-users? I don&#039;t want to use the profile page as home page.

Thank you!</description>
		<content:encoded><![CDATA[<p>Hi Brajesh,</p>
<p>I&#8217;d like to have two different home pages: one for logged users and other for non-logged users. What I have to change in your code to redirect the user to a specific the home page for logged-users? I don&#8217;t want to use the profile page as home page.</p>
<p>Thank you!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Natalie</title>
		<link>http://buddydev.com/buddypress/buddypress-trick-redirect-users-to-their-profile-on-login/comment-page-1/#comment-16532</link>
		<dc:creator>Natalie</dc:creator>
		<pubDate>Fri, 24 Jun 2011 14:43:24 +0000</pubDate>
		<guid isPermaLink="false">http://buddydev.com/?p=88#comment-16532</guid>
		<description>Thanks a lot Brajesh!</description>
		<content:encoded><![CDATA[<p>Thanks a lot Brajesh!</p>
]]></content:encoded>
	</item>
</channel>
</rss>

