<?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>Комментарии: Интеграция авторизации  phpbb3</title>
	<atom:link href="http://saintist.ru/2009/04/23/integraciya-avtorizacii-phpbb3/feed/" rel="self" type="application/rss+xml" />
	<link>http://saintist.ru/2009/04/23/integraciya-avtorizacii-phpbb3/</link>
	<description>php phpquery css jscript jQuery</description>
	<lastBuildDate>Wed, 25 Jan 2012 12:35:27 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
<xhtml:meta xmlns:xhtml="http://www.w3.org/1999/xhtml" name="robots" content="noindex" />
	<item>
		<title>Автор: saintist</title>
		<link>http://saintist.ru/2009/04/23/integraciya-avtorizacii-phpbb3/comment-page-1/#comment-1018</link>
		<dc:creator>saintist</dc:creator>
		<pubDate>Mon, 23 Aug 2010 11:50:36 +0000</pubDate>
		<guid isPermaLink="false">http://saintist.ru/?p=68#comment-1018</guid>
		<description>примерно вот так

сам кусок кода logout


if ($user-&gt;data[&#039;user_id&#039;] != ANONYMOUS &amp;&amp; isset($_GET[&#039;sid&#039;]) &amp;&amp; !is_array($_GET[&#039;sid&#039;]) &amp;&amp; $_GET[&#039;sid&#039;] === $user-&gt;session_id)
      {
         $user-&gt;session_kill();
         $user-&gt;session_begin();
         $message = $user-&gt;lang[&#039;LOGOUT_REDIRECT&#039;];
      }

т.е.  уничтожаем сессию пользователя

 $user-&gt;session_kill();

а отлавливать  можно свою GET переменную заданную если ссылкой сделать logout в phpbb3</description>
		<content:encoded><![CDATA[<p>примерно вот так</p>
<p>сам кусок кода logout</p>
<p>if ($user-&gt;data['user_id'] != ANONYMOUS &amp;&amp; isset($_GET['sid']) &amp;&amp; !is_array($_GET['sid']) &amp;&amp; $_GET['sid'] === $user-&gt;session_id)<br />
      {<br />
         $user-&gt;session_kill();<br />
         $user-&gt;session_begin();<br />
         $message = $user-&gt;lang['LOGOUT_REDIRECT'];<br />
      }</p>
<p>т.е.  уничтожаем сессию пользователя</p>
<p> $user-&gt;session_kill();</p>
<p>а отлавливать  можно свою GET переменную заданную если ссылкой сделать logout в phpbb3</p>
]]></content:encoded>
	</item>
	<item>
		<title>Автор: Юрий</title>
		<link>http://saintist.ru/2009/04/23/integraciya-avtorizacii-phpbb3/comment-page-1/#comment-1017</link>
		<dc:creator>Юрий</dc:creator>
		<pubDate>Mon, 23 Aug 2010 11:31:43 +0000</pubDate>
		<guid isPermaLink="false">http://saintist.ru/?p=68#comment-1017</guid>
		<description>Польщователь авторизовался. А как сделать возмоность разлогиниться (по ссылке &quot;Выход&quot;, напр.)?</description>
		<content:encoded><![CDATA[<p>Польщователь авторизовался. А как сделать возмоность разлогиниться (по ссылке &#171;Выход&#187;, напр.)?</p>
]]></content:encoded>
	</item>
	<item>
		<title>Автор: Mr_add</title>
		<link>http://saintist.ru/2009/04/23/integraciya-avtorizacii-phpbb3/comment-page-1/#comment-985</link>
		<dc:creator>Mr_add</dc:creator>
		<pubDate>Tue, 22 Jun 2010 06:53:46 +0000</pubDate>
		<guid isPermaLink="false">http://saintist.ru/?p=68#comment-985</guid>
		<description>saintist, большое спасибо за участие... Проблема частично решена...
Нужно перед &quot;$user-&gt;session_begin();&quot; вставить &quot;$user = new user();&quot; Т.е. должно быть 
$user = new user();
$user-&gt;session_begin();
Вот только что-то при переходе на форум просит авторизацию((... Похоже cookies надо ковырять.</description>
		<content:encoded><![CDATA[<p>saintist, большое спасибо за участие&#8230; Проблема частично решена&#8230;<br />
Нужно перед &#171;$user-&gt;session_begin();&#187; вставить &#171;$user = new user();&#187; Т.е. должно быть<br />
$user = new user();<br />
$user-&gt;session_begin();<br />
Вот только что-то при переходе на форум просит авторизацию((&#8230; Похоже cookies надо ковырять.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Автор: saintist</title>
		<link>http://saintist.ru/2009/04/23/integraciya-avtorizacii-phpbb3/comment-page-1/#comment-984</link>
		<dc:creator>saintist</dc:creator>
		<pubDate>Tue, 22 Jun 2010 06:44:36 +0000</pubDate>
		<guid isPermaLink="false">http://saintist.ru/?p=68#comment-984</guid>
		<description>попробуй не использовать common

сделай загрузку только той части ядра которая тебе нужна

посмотри исходники common

$user-&gt;session_begin();

session_begin находится в includes/session.php

класс user наследует свойства класса session

к сожалению у себя не нашел пример чтоб показать , делал проект там было отлично  сделана  в отдельном файле  такая загрузка для обеспечения авторизации и  работы с БД


includes\session.php</description>
		<content:encoded><![CDATA[<p>попробуй не использовать common</p>
<p>сделай загрузку только той части ядра которая тебе нужна</p>
<p>посмотри исходники common</p>
<p>$user-&gt;session_begin();</p>
<p>session_begin находится в includes/session.php</p>
<p>класс user наследует свойства класса session</p>
<p>к сожалению у себя не нашел пример чтоб показать , делал проект там было отлично  сделана  в отдельном файле  такая загрузка для обеспечения авторизации и  работы с БД</p>
<p>includes\session.php</p>
]]></content:encoded>
	</item>
	<item>
		<title>Автор: Mr_add</title>
		<link>http://saintist.ru/2009/04/23/integraciya-avtorizacii-phpbb3/comment-page-1/#comment-983</link>
		<dc:creator>Mr_add</dc:creator>
		<pubDate>Tue, 22 Jun 2010 06:25:07 +0000</pubDate>
		<guid isPermaLink="false">http://saintist.ru/?p=68#comment-983</guid>
		<description>Добавил: 
include($phpbb_root_path . ‘includes/functions_display.’ . $phpEx);
Та же ошибка((((</description>
		<content:encoded><![CDATA[<p>Добавил:<br />
include($phpbb_root_path . ‘includes/functions_display.’ . $phpEx);<br />
Та же ошибка((((</p>
]]></content:encoded>
	</item>
	<item>
		<title>Автор: Mr_add</title>
		<link>http://saintist.ru/2009/04/23/integraciya-avtorizacii-phpbb3/comment-page-1/#comment-982</link>
		<dc:creator>Mr_add</dc:creator>
		<pubDate>Tue, 22 Jun 2010 06:21:19 +0000</pubDate>
		<guid isPermaLink="false">http://saintist.ru/?p=68#comment-982</guid>
		<description>Конечно)... Он просто не прошел...

?php
define(&#039;IN_PHPBB&#039;, true);
//global $phpbb_root_path, $phpEx;
$phpbb_root_path = (defined(&#039;PHPBB_ROOT_PATH&#039;)) ? PHPBB_ROOT_PATH : &#039;./bb3/&#039;;
$phpEx = substr(strrchr(__FILE__, &#039;.&#039;), 1);
include($phpbb_root_path . &#039;common.&#039; . $phpEx);
include($phpbb_root_path . &#039;includes/functions_user.&#039; . $phpEx);
require($phpbb_root_path . &#039;includes/functions_module.&#039; . $phpEx);</description>
		<content:encoded><![CDATA[<p>Конечно)&#8230; Он просто не прошел&#8230;</p>
<p>?php<br />
define(&#8216;IN_PHPBB&#8217;, true);<br />
//global $phpbb_root_path, $phpEx;<br />
$phpbb_root_path = (defined(&#8216;PHPBB_ROOT_PATH&#8217;)) ? PHPBB_ROOT_PATH : &#8216;./bb3/&#8217;;<br />
$phpEx = substr(strrchr(__FILE__, &#8216;.&#8217;), 1);<br />
include($phpbb_root_path . &#8216;common.&#8217; . $phpEx);<br />
include($phpbb_root_path . &#8216;includes/functions_user.&#8217; . $phpEx);<br />
require($phpbb_root_path . &#8216;includes/functions_module.&#8217; . $phpEx);</p>
]]></content:encoded>
	</item>
	<item>
		<title>Автор: saintist</title>
		<link>http://saintist.ru/2009/04/23/integraciya-avtorizacii-phpbb3/comment-page-1/#comment-981</link>
		<dc:creator>saintist</dc:creator>
		<pubDate>Tue, 22 Jun 2010 06:13:43 +0000</pubDate>
		<guid isPermaLink="false">http://saintist.ru/?p=68#comment-981</guid>
		<description>а есть перед $user-&gt;session_begin();

такой вот код ?

define(&#039;IN_PHPBB&#039;, true);
$phpbb_root_path = (defined(&#039;PHPBB_ROOT_PATH&#039;)) ? PHPBB_ROOT_PATH : &#039;./&#039;;
$phpEx = substr(strrchr(__FILE__, &#039;.&#039;), 1);
include($phpbb_root_path . &#039;common.&#039; . $phpEx);
include($phpbb_root_path . &#039;includes/functions_display.&#039; . $phpEx);</description>
		<content:encoded><![CDATA[<p>а есть перед $user-&gt;session_begin();</p>
<p>такой вот код ?</p>
<p>define(&#8216;IN_PHPBB&#8217;, true);<br />
$phpbb_root_path = (defined(&#8216;PHPBB_ROOT_PATH&#8217;)) ? PHPBB_ROOT_PATH : &#8216;./&#8217;;<br />
$phpEx = substr(strrchr(__FILE__, &#8216;.&#8217;), 1);<br />
include($phpbb_root_path . &#8216;common.&#8217; . $phpEx);<br />
include($phpbb_root_path . &#8216;includes/functions_display.&#8217; . $phpEx);</p>
]]></content:encoded>
	</item>
	<item>
		<title>Автор: Mr_add</title>
		<link>http://saintist.ru/2009/04/23/integraciya-avtorizacii-phpbb3/comment-page-1/#comment-980</link>
		<dc:creator>Mr_add</dc:creator>
		<pubDate>Tue, 22 Jun 2010 05:51:37 +0000</pubDate>
		<guid isPermaLink="false">http://saintist.ru/?p=68#comment-980</guid>
		<description>Пожалуйста....

0 &amp;&amp; @$login &amp;&amp; @$password)
  {
    @$clrow=mysql_fetch_array($clres);
    if((@$clrow[9]==1)&amp;&amp;(@$clrow[3]==@$password))  $access=true;
  }
  if(@$access)
  {
    setcookie(&quot;vologin&quot;,$login);
    setcookie(&quot;vopwd&quot;,$password);
	//----------------------Пытаюсь открыть сессию------------------------------------------------
	$user-&gt;session_begin(false);
	$auth-&gt;acl($user-&gt;data);
	$user-&gt;setup(&#039;ucp&#039;); //Кстати, в оригинальном файле index.php вместо &#039;ucp&#039; стоит &#039;viewforum&#039;

	if(isset($_POST[&#039;vologin&#039;]) &amp;&amp; $user-&gt;data[&#039;user_id&#039;] == ANONYMOUS)
	{
	$auth-&gt;login($username, $password, true);
	}
	//-----------------------------------------------------------------------------------------
    $hh=&quot;location: ../index.php&quot;.$_POST[&#039;from&#039;];
  }
  else $hh=&quot;location: ../index.php?id=6&amp;act=1&quot;;

  header($hh);
}
?&gt;</description>
		<content:encoded><![CDATA[<p>Пожалуйста&#8230;.</p>
<p>0 &amp;&amp; @$login &amp;&amp; @$password)<br />
  {<br />
    @$clrow=mysql_fetch_array($clres);<br />
    if((@$clrow[9]==1)&amp;&amp;(@$clrow[3]==@$password))  $access=true;<br />
  }<br />
  if(@$access)<br />
  {<br />
    setcookie(&#171;vologin&#187;,$login);<br />
    setcookie(&#171;vopwd&#187;,$password);<br />
	//&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-Пытаюсь открыть сессию&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;<br />
	$user-&gt;session_begin(false);<br />
	$auth-&gt;acl($user-&gt;data);<br />
	$user-&gt;setup(&#8216;ucp&#8217;); //Кстати, в оригинальном файле index.php вместо &#8216;ucp&#8217; стоит &#8216;viewforum&#8217;</p>
<p>	if(isset($_POST['vologin']) &amp;&amp; $user-&gt;data['user_id'] == ANONYMOUS)<br />
	{<br />
	$auth-&gt;login($username, $password, true);<br />
	}<br />
	//&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;<br />
    $hh=&#187;location: ../index.php&#187;.$_POST['from'];<br />
  }<br />
  else $hh=&#187;location: ../index.php?id=6&amp;act=1&#8243;;</p>
<p>  header($hh);<br />
}<br />
?&gt;</p>
]]></content:encoded>
	</item>
	<item>
		<title>Автор: saintist</title>
		<link>http://saintist.ru/2009/04/23/integraciya-avtorizacii-phpbb3/comment-page-1/#comment-979</link>
		<dc:creator>saintist</dc:creator>
		<pubDate>Mon, 21 Jun 2010 15:23:26 +0000</pubDate>
		<guid isPermaLink="false">http://saintist.ru/?p=68#comment-979</guid>
		<description>C:\xampp\xampp\htdocs\vashopit.local\www\useract.php

листинг  файла приведи</description>
		<content:encoded><![CDATA[<p>C:\xampp\xampp\htdocs\vashopit.local\www\useract.php</p>
<p>листинг  файла приведи</p>
]]></content:encoded>
	</item>
	<item>
		<title>Автор: saintist</title>
		<link>http://saintist.ru/2009/04/23/integraciya-avtorizacii-phpbb3/comment-page-1/#comment-978</link>
		<dc:creator>saintist</dc:creator>
		<pubDate>Mon, 21 Jun 2010 13:21:37 +0000</pubDate>
		<guid isPermaLink="false">http://saintist.ru/?p=68#comment-978</guid>
		<description>спроси на форуме разработчиков, я эту версию не пробовал,  так навскидку не смогу подсказать</description>
		<content:encoded><![CDATA[<p>спроси на форуме разработчиков, я эту версию не пробовал,  так навскидку не смогу подсказать</p>
]]></content:encoded>
	</item>
	<item>
		<title>Автор: Mr_add</title>
		<link>http://saintist.ru/2009/04/23/integraciya-avtorizacii-phpbb3/comment-page-1/#comment-977</link>
		<dc:creator>Mr_add</dc:creator>
		<pubDate>Mon, 21 Jun 2010 12:40:42 +0000</pubDate>
		<guid isPermaLink="false">http://saintist.ru/?p=68#comment-977</guid>
		<description>Скачал. Ставил с нуля...</description>
		<content:encoded><![CDATA[<p>Скачал. Ставил с нуля&#8230;</p>
]]></content:encoded>
	</item>
	<item>
		<title>Автор: saintist</title>
		<link>http://saintist.ru/2009/04/23/integraciya-avtorizacii-phpbb3/comment-page-1/#comment-976</link>
		<dc:creator>saintist</dc:creator>
		<pubDate>Mon, 21 Jun 2010 12:29:13 +0000</pubDate>
		<guid isPermaLink="false">http://saintist.ru/?p=68#comment-976</guid>
		<description>$user-&gt;session_begin(); 

session_begin() не является методом класса user

обновлял до 3.0.7 или скачал  версию 3.0.7 ?</description>
		<content:encoded><![CDATA[<p>$user-&gt;session_begin(); </p>
<p>session_begin() не является методом класса user</p>
<p>обновлял до 3.0.7 или скачал  версию 3.0.7 ?</p>
]]></content:encoded>
	</item>
	<item>
		<title>Автор: Mr_add</title>
		<link>http://saintist.ru/2009/04/23/integraciya-avtorizacii-phpbb3/comment-page-1/#comment-975</link>
		<dc:creator>Mr_add</dc:creator>
		<pubDate>Mon, 21 Jun 2010 12:23:45 +0000</pubDate>
		<guid isPermaLink="false">http://saintist.ru/?p=68#comment-975</guid>
		<description>Fatal error: Call to a member function session_begin() on a non-object in C:\xampp\xampp\htdocs\vashopit.local\www\useract.php  on line 279

на 279 лайне $user-&gt;session_begin();

В чем может быть проблема? Версия форума - 3.0.7</description>
		<content:encoded><![CDATA[<p>Fatal error: Call to a member function session_begin() on a non-object in C:\xampp\xampp\htdocs\vashopit.local\www\useract.php  on line 279</p>
<p>на 279 лайне $user-&gt;session_begin();</p>
<p>В чем может быть проблема? Версия форума &#8212; 3.0.7</p>
]]></content:encoded>
	</item>
	<item>
		<title>Автор: Yurik</title>
		<link>http://saintist.ru/2009/04/23/integraciya-avtorizacii-phpbb3/comment-page-1/#comment-780</link>
		<dc:creator>Yurik</dc:creator>
		<pubDate>Mon, 29 Mar 2010 01:29:53 +0000</pubDate>
		<guid isPermaLink="false">http://saintist.ru/?p=68#comment-780</guid>
		<description>Вот спасибо. Пригодилось. =)</description>
		<content:encoded><![CDATA[<p>Вот спасибо. Пригодилось. =)</p>
]]></content:encoded>
	</item>
	<item>
		<title>Автор: saintist</title>
		<link>http://saintist.ru/2009/04/23/integraciya-avtorizacii-phpbb3/comment-page-1/#comment-31</link>
		<dc:creator>saintist</dc:creator>
		<pubDate>Sat, 09 May 2009 14:55:09 +0000</pubDate>
		<guid isPermaLink="false">http://saintist.ru/?p=68#comment-31</guid>
		<description>Снайперу:
относительно модулей  не знаю, не интересовался этим вопросом, может плагины в phpbb3 где и есть , вот вроде бы  что-то похожее http://saintist.ru/2009/04/22/phpbb3-vneshnyaya-avtorizaciya/ 
в принципе можно такой модуль самому написать код приведенный в статье дает базовые понятия</description>
		<content:encoded><![CDATA[<p>Снайперу:<br />
относительно модулей  не знаю, не интересовался этим вопросом, может плагины в phpbb3 где и есть , вот вроде бы  что-то похожее <a href="http://saintist.ru/2009/04/22/phpbb3-vneshnyaya-avtorizaciya/" rel="nofollow">http://saintist.ru/2009/04/22/phpbb3-vneshnyaya-avtorizaciya/</a><br />
в принципе можно такой модуль самому написать код приведенный в статье дает базовые понятия</p>
]]></content:encoded>
	</item>
	<item>
		<title>Автор: Снайпер</title>
		<link>http://saintist.ru/2009/04/23/integraciya-avtorizacii-phpbb3/comment-page-1/#comment-24</link>
		<dc:creator>Снайпер</dc:creator>
		<pubDate>Sat, 09 May 2009 03:58:03 +0000</pubDate>
		<guid isPermaLink="false">http://saintist.ru/?p=68#comment-24</guid>
		<description>Не подскажите есть ли где подобного вида модули для интеграции phpbb3  нужно сделать единую регистрацию с phpbb3 на самописном двжике</description>
		<content:encoded><![CDATA[<p>Не подскажите есть ли где подобного вида модули для интеграции phpbb3  нужно сделать единую регистрацию с phpbb3 на самописном двжике</p>
]]></content:encoded>
	</item>
	<item>
		<title>Автор: Александр</title>
		<link>http://saintist.ru/2009/04/23/integraciya-avtorizacii-phpbb3/comment-page-1/#comment-18</link>
		<dc:creator>Александр</dc:creator>
		<pubDate>Wed, 06 May 2009 04:14:23 +0000</pubDate>
		<guid isPermaLink="false">http://saintist.ru/?p=68#comment-18</guid>
		<description>Спасибо разобрался!</description>
		<content:encoded><![CDATA[<p>Спасибо разобрался!</p>
]]></content:encoded>
	</item>
	<item>
		<title>Автор: admin</title>
		<link>http://saintist.ru/2009/04/23/integraciya-avtorizacii-phpbb3/comment-page-1/#comment-16</link>
		<dc:creator>admin</dc:creator>
		<pubDate>Tue, 05 May 2009 14:15:31 +0000</pubDate>
		<guid isPermaLink="false">http://saintist.ru/?p=68#comment-16</guid>
		<description>для Александр: 

$login = $auth-&gt;login($username, $password, $autologin);

$login будет содержать параметры 
в случае правильной авторизации  данные в виде массива  о  учётке пользователя
 в случае  ошибки , тоже набор данных  в виде массива, один  из  элементов массива возвращаенного  в $login  код  ошибки</description>
		<content:encoded><![CDATA[<p>для Александр: </p>
<p>$login = $auth->login($username, $password, $autologin);</p>
<p>$login будет содержать параметры<br />
в случае правильной авторизации  данные в виде массива  о  учётке пользователя<br />
 в случае  ошибки , тоже набор данных  в виде массива, один  из  элементов массива возвращаенного  в $login  код  ошибки</p>
]]></content:encoded>
	</item>
	<item>
		<title>Автор: Александр</title>
		<link>http://saintist.ru/2009/04/23/integraciya-avtorizacii-phpbb3/comment-page-1/#comment-12</link>
		<dc:creator>Александр</dc:creator>
		<pubDate>Tue, 05 May 2009 11:19:22 +0000</pubDate>
		<guid isPermaLink="false">http://saintist.ru/?p=68#comment-12</guid>
		<description>А если нужно зделать чтоб проходила проверка на правильность логина пароля?</description>
		<content:encoded><![CDATA[<p>А если нужно зделать чтоб проходила проверка на правильность логина пароля?</p>
]]></content:encoded>
	</item>
</channel>
</rss>

<!-- Performance optimized by W3 Total Cache. Learn more: http://www.w3-edge.com/wordpress-plugins/

Page Caching using disk: basic
Database Caching 8/29 queries in 0.010 seconds using disk: basic

Served from: saintist.ru @ 2012-02-08 14:54:26 -->
