<?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: Zend authentication component (Zend_Auth), database storage class</title>
	<atom:link href="http://inchoo.net/zend/zend-authentication-component-zend_auth-database-storage-class/feed/" rel="self" type="application/rss+xml" />
	<link>http://inchoo.net/tools-frameworks/zend/zend-authentication-component-zend_auth-database-storage-class/</link>
	<description>Magento Design and Magento Development Professionals - Inchoo</description>
	<lastBuildDate>Fri, 10 Feb 2012 19:34:16 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
	<item>
		<title>By: Peter</title>
		<link>http://inchoo.net/tools-frameworks/zend/zend-authentication-component-zend_auth-database-storage-class/comment-page-1/#comment-6496</link>
		<dc:creator>Peter</dc:creator>
		<pubDate>Wed, 17 Mar 2010 17:31:44 +0000</pubDate>
		<guid isPermaLink="false">http://inchoo.net/?p=1045#comment-6496</guid>
		<description>also I think if the timetoExpire which is optional parameter wasn&#039;t set session was just expiring all the time 

I had to change 
if(time() - $result[self::$_requiredFieldAccessed] &gt; self::$_timeToExpire)

to 
if(self::$_timeToExpire &amp;&amp; time() - $result[self::$_requiredFieldAccessed] &gt; self::$_timeToExpire)

cheers

peter</description>
		<content:encoded><![CDATA[<p>also I think if the timetoExpire which is optional parameter wasn&#8217;t set session was just expiring all the time </p>
<p>I had to change<br />
if(time() &#8211; $result[self::$_requiredFieldAccessed] &gt; self::$_timeToExpire)</p>
<p>to<br />
if(self::$_timeToExpire &amp;&amp; time() &#8211; $result[self::$_requiredFieldAccessed] &gt; self::$_timeToExpire)</p>
<p>cheers</p>
<p>peter</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Peter</title>
		<link>http://inchoo.net/tools-frameworks/zend/zend-authentication-component-zend_auth-database-storage-class/comment-page-1/#comment-6495</link>
		<dc:creator>Peter</dc:creator>
		<pubDate>Wed, 17 Mar 2010 17:20:00 +0000</pubDate>
		<guid isPermaLink="false">http://inchoo.net/?p=1045#comment-6495</guid>
		<description>change
$newStore = new AuthDbStorage($database, &#039;MyCookie&#039;, &#039;user&#039;, &#039;email&#039;, 20);

to 
$newStore = new Model_Auth_Storage_Db($database, &#039;PHPSESSID&#039;, &#039;session&#039;, &#039;email&#039;);

to get rid of notice.
I would also change:
if(Zend_Auth::getInstance()-&gt;hasIdentity())
{
Zend_Auth::getInstance()-&gt;getStorage()-&gt;write(
Zend_Auth::getInstance()-&gt;getStorage()-&gt;read(),
array(&#039;someKeyName&#039; =&gt; &#039;Some val&#039;, &#039;someKeyName2&#039; =&gt; &#039;Some val2&#039;)
);
}

to 
$auth-&gt;authenticate($adapter);
but this way u lose that optional extraData to write parameter but I did not need it 

basically i&#039;m using factory so I&#039;ve changed more things

my session table:
CREATE TABLE `session` (
  `id` int(10) unsigned NOT NULL auto_increment,
  `sid` text,
  `uid` text,
  `hostname` varchar(255) default NULL,
  `accessed` int(11) default NULL,
  PRIMARY KEY  (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=26 DEFAULT CHARSET=latin1;

sid and uid probably do not need to be text

peter</description>
		<content:encoded><![CDATA[<p>change<br />
$newStore = new AuthDbStorage($database, &#8216;MyCookie&#8217;, &#8216;user&#8217;, &#8216;email&#8217;, 20);</p>
<p>to<br />
$newStore = new Model_Auth_Storage_Db($database, &#8216;PHPSESSID&#8217;, &#8216;session&#8217;, &#8216;email&#8217;);</p>
<p>to get rid of notice.<br />
I would also change:<br />
if(Zend_Auth::getInstance()-&gt;hasIdentity())<br />
{<br />
Zend_Auth::getInstance()-&gt;getStorage()-&gt;write(<br />
Zend_Auth::getInstance()-&gt;getStorage()-&gt;read(),<br />
array(&#8216;someKeyName&#8217; =&gt; &#8216;Some val&#8217;, &#8216;someKeyName2&#8242; =&gt; &#8216;Some val2&#8242;)<br />
);<br />
}</p>
<p>to<br />
$auth-&gt;authenticate($adapter);<br />
but this way u lose that optional extraData to write parameter but I did not need it </p>
<p>basically i&#8217;m using factory so I&#8217;ve changed more things</p>
<p>my session table:<br />
CREATE TABLE `session` (<br />
  `id` int(10) unsigned NOT NULL auto_increment,<br />
  `sid` text,<br />
  `uid` text,<br />
  `hostname` varchar(255) default NULL,<br />
  `accessed` int(11) default NULL,<br />
  PRIMARY KEY  (`id`)<br />
) ENGINE=MyISAM AUTO_INCREMENT=26 DEFAULT CHARSET=latin1;</p>
<p>sid and uid probably do not need to be text</p>
<p>peter</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ed</title>
		<link>http://inchoo.net/tools-frameworks/zend/zend-authentication-component-zend_auth-database-storage-class/comment-page-1/#comment-3680</link>
		<dc:creator>Ed</dc:creator>
		<pubDate>Mon, 02 Nov 2009 21:47:55 +0000</pubDate>
		<guid isPermaLink="false">http://inchoo.net/?p=1045#comment-3680</guid>
		<description>Thanks for the code snippets and explanation.  I plugged this into our application in development and then realized that I had to create the session table, but didn&#039;t have a schema for it!  I&#039;ve tried reverse engineering what the table should be with limited luck.  Any chance you might want to share your table structure? :)</description>
		<content:encoded><![CDATA[<p>Thanks for the code snippets and explanation.  I plugged this into our application in development and then realized that I had to create the session table, but didn&#8217;t have a schema for it!  I&#8217;ve tried reverse engineering what the table should be with limited luck.  Any chance you might want to share your table structure? <img src='http://inchoo.net/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Gael</title>
		<link>http://inchoo.net/tools-frameworks/zend/zend-authentication-component-zend_auth-database-storage-class/comment-page-1/#comment-3316</link>
		<dc:creator>Gael</dc:creator>
		<pubDate>Thu, 17 Sep 2009 13:25:00 +0000</pubDate>
		<guid isPermaLink="false">http://inchoo.net/?p=1045#comment-3316</guid>
		<description>Hi,

Thanks for your code but I tried to use it and I have an error that says :

&quot;Notice: Undefined index: MyCookie in S:\wamp\www\cvwanted\application\classes\AuthDbStorage.php on line 43&quot;

So do I have to set the cookie first somewhere.

Thanks for your advise.

Gael</description>
		<content:encoded><![CDATA[<p>Hi,</p>
<p>Thanks for your code but I tried to use it and I have an error that says :</p>
<p>&#8220;Notice: Undefined index: MyCookie in S:\wamp\www\cvwanted\application\classes\AuthDbStorage.php on line 43&#8243;</p>
<p>So do I have to set the cookie first somewhere.</p>
<p>Thanks for your advise.</p>
<p>Gael</p>
]]></content:encoded>
	</item>
</channel>
</rss>

