<p>I have following situation:
I have loged user, standard authentication with DB table </p>

<pre><code>$authAdapter = new Zend_Auth_Adapter_DbTable(Zend_Db_Table::getDefaultAdapter()); 
$authAdapter-&gt;setTableName('users'); 
$authAdapter-&gt;setIdentityColumn('user_name'); 
$authAdapter-&gt;setCredentialColumn('password'); 
</code></pre>

<p>When user edits his profile, I save it into Db, but I need to update also storage (using standard Zend_Auth_Storage_Session). Is there any easy way how to do it? Many thanks. </p>

I have done it like this, it works, but I don't know if there is not some better way,how to do it
```
```
$user_data = User::getUser($user_id)->toArray();
unset($user_data['password']);

$std_user = new stdClass();

foreach ($user_data as $key => $value)
{
   $std_user->$key = $value;
}

$auth = Zend_Auth::getInstance();     
$auth->getStorage()->write($std_user);
```
```