Hi, I was doing it that way because that's the only way I figured out how to
do it.  I see what you mean now, I've change the following:


1) After user login, if the Zend_Auth_Adapter_DbTable is valid, then add the
extra data (userid) to my data column of the session table:

$adapter = $this->getAuthAdapter($db, $this->view->form->getValues());
$auth = Zend_Auth::getInstance();
$result = $auth->authenticate($adapter);
       
// The user provided by credentials.
if($result->isValid()) {
   $results = $adapter->getResultRowObject(array('id', 'username'));            
        
   $mysession = new Zend_Session_Namespace('mysession');
   $mysession->id = $results->id;
   $mysession->username = $results->username;
} 


2) // Extract the data 
$mysession = new Zend_Session_Namespace('mysession');
echo $mysession ->id;
echo $mysession ->username; 

I'm assuming this is the correct way to do it.
-- 
View this message in context: 
http://n4.nabble.com/Is-saving-userId-in-a-session-database-table-possible-Zend-Session-SaveHandler-DbTable-tp1359860p1569184.html
Sent from the Zend Framework mailing list archive at Nabble.com.

Reply via email to