<?xml version="1.0" encoding="UTF-8"?><!-- generator="bbPress" -->

<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
>

<channel>
<title>bbPress support forums Topic: Access bbPress login info from existing site</title>
<link>http://bbpress.org/forums/</link>
<description>bbPress support forums Topic: Access bbPress login info from existing site</description>
<language>en</language>
<pubDate>Tue, 02 Dec 2008 05:22:27 +0000</pubDate>

<item>
<title>kehlers on "Access bbPress login info from existing site"</title>
<link>http://bbpress.org/forums/topic/access-bbpress-login-info-from-existing-site#post-8248</link>
<pubDate>Tue, 19 Jun 2007 18:23:09 +0000</pubDate>
<dc:creator>kehlers</dc:creator>
<guid isPermaLink="false">8248@http://bbpress.org/forums/</guid>
<description>&#60;p&#62;Well, your guess was correct! Your tip got me to thinking about cookies - I'm a little rusty on my setcookie() syntax! Anyhow, I decided to install WordPress, even though I don't need it just now, because if I could get that to integrate across directories, then I could surely do what I'm hoping for with the gallery.php page. &#60;/p&#62;
&#60;p&#62;That helped me to understand the interactions of the cookies and directories and domains. All that to say, I was able to get it to work using the following in config.php:&#60;br /&#62;
&#60;pre&#62;&#60;code&#62;$bb_cookiepath = &#38;quot;/&#38;quot;;
$bb_cookiedomain = &#38;quot;.mydomain.com&#38;quot; ;&#60;/code&#62;&#60;/pre&#62;
&#60;p&#62;I believe that if cookie domain is not specified, then it will default to be the root of the directory in which the script is running, i.e. mydomain.com/forums/, making it unavailable to any other directory, including parent directories. You probably already knew that, but just putting it out there in case someone else has the same issue. ;)
&#60;/p&#62;</description>
</item>
<item>
<title>fel64 on "Access bbPress login info from existing site"</title>
<link>http://bbpress.org/forums/topic/access-bbpress-login-info-from-existing-site#post-8238</link>
<pubDate>Tue, 19 Jun 2007 09:10:37 +0000</pubDate>
<dc:creator>fel64</dc:creator>
<guid isPermaLink="false">8238@http://bbpress.org/forums/</guid>
<description>&#60;p&#62;My guess was that the cookies were set for the forum but not for folders higher up, but if that didn't fix it I don't know if that's right.
&#60;/p&#62;</description>
</item>
<item>
<title>kehlers on "Access bbPress login info from existing site"</title>
<link>http://bbpress.org/forums/topic/access-bbpress-login-info-from-existing-site#post-8203</link>
<pubDate>Tue, 19 Jun 2007 00:51:52 +0000</pubDate>
<dc:creator>kehlers</dc:creator>
<guid isPermaLink="false">8203@http://bbpress.org/forums/</guid>
<description>&#60;p&#62;Hm. I'm pretty sure I'm actually logged in. Let's say I'm at the gallery.php page, which is in the root of mydomain.com. I type in my valid login id and password. The next thing I see is the front page of my forum (http://mydomain.com/forums/index.php) , which reads &#34;Welcome, kehlers (View your profile)&#34; etc.  I can add, post, go to admin section, etc. When I view cookies, I have a &#60;code&#62;bb_user_(hash)&#60;/code&#62; and &#60;code&#62;bb_pass_(hash)&#60;/code&#62;, which seem to have appropriate values. All that to say, I think I'm logged in successfully. &#60;/p&#62;
&#60;p&#62;However, if I go back to gallery.php, I still see the login form, as though nothing has happened. I did try adding &#60;code&#62;$bb-&#38;gt;cookiepath = &#38;#39;/&#38;#39;;&#60;/code&#62; to my config.php, but it didn't seem to make a difference. Do I need to restart anything (browser? Apache?) once I've added that? I wouldn't think so, but thought it was worth asking. &#60;/p&#62;
&#60;p&#62;Thanks for your help on this!
&#60;/p&#62;</description>
</item>
<item>
<title>fel64 on "Access bbPress login info from existing site"</title>
<link>http://bbpress.org/forums/topic/access-bbpress-login-info-from-existing-site#post-8192</link>
<pubDate>Mon, 18 Jun 2007 21:43:44 +0000</pubDate>
<dc:creator>fel64</dc:creator>
<guid isPermaLink="false">8192@http://bbpress.org/forums/</guid>
<description>&#60;p&#62;Are you sure you're actually logged in? I would argue that you're not logged in if it comes up with the login form.&#60;/p&#62;
&#60;p&#62;I think this sounds like a cookies issue. Can you add this to your config.php and see if it works?&#60;br /&#62;
&#60;code&#62;$bb-&#38;gt;cookiepath = &#38;#39;/&#38;#39;;&#60;/code&#62;&#60;/p&#62;
&#60;p&#62;If not, check what the properties are for cookies set (just to make sure that's not the problem).
&#60;/p&#62;</description>
</item>
<item>
<title>kehlers on "Access bbPress login info from existing site"</title>
<link>http://bbpress.org/forums/topic/access-bbpress-login-info-from-existing-site#post-8189</link>
<pubDate>Mon, 18 Jun 2007 18:51:02 +0000</pubDate>
<dc:creator>kehlers</dc:creator>
<guid isPermaLink="false">8189@http://bbpress.org/forums/</guid>
<description>&#60;p&#62;I've tried to find the answer to this by reading the forums and my own experimentation, but I'm still having problems. Any information welcome. In summary, the only way I can seem to acess bbPress login info from other pages on my site is to put bbPress at the root of my site, i.e. on the same level as my other scripts.&#60;/p&#62;
&#60;p&#62;I have a PHP/MySQL installation and I would like to integrate bbPress with my own PHP applications. I don't want the user to have to have two login IDs/passwords - my issue is very similar to &#60;a href=&#34;http://bbpress.org/forums/topic/298&#34;&#62;User table abstracted in future versions?&#60;/a&#62;, only in reverse. That is, I want to use bbPress functions as the primary authentication/registration and have my apps acess the bbPress user info.&#60;/p&#62;
&#60;p&#62;EX:  I have a file called &#60;a href=&#34;http://mydomain.com/gallery.php,&#34; rel=&#34;nofollow&#34;&#62;http://mydomain.com/gallery.php,&#60;/a&#62; in which I have added the following code:&#60;br /&#62;
&#60;pre&#62;&#60;code&#62;require(&#38;quot;bb-load.php&#38;quot;);
login_form();
bb_get_current_user_info(&#38;#39;id&#38;#39;);
if  (bb_current_user_can(&#38;#39;administrate&#38;#39;)) {
 //do some things admins can do
}&#60;/code&#62;&#60;/pre&#62;
&#60;p&#62;IF I put the bbPress install at the root of mydomain.com, this all works beautifully, but I want to put the bbPress install in &#60;a href=&#34;http://mydomain.com/forums/.&#34; rel=&#34;nofollow&#34;&#62;http://mydomain.com/forums/.&#60;/a&#62; If I do that, altering the code to point to &#34;forums/bb-load.php&#34;, I get the login form, but it doesn't work:  I can type userid and password, and click login, but no login occurs. Furthermore, the login form appears even if a valid user is currently logged in - it doesn't say &#34;Welcome, UserID&#34;.&#60;/p&#62;
&#60;p&#62;Do I need to do a plug-in? If so, what would it do, in general? Thanks in advance!
&#60;/p&#62;</description>
</item>

</channel>
</rss>
