public function loadUserAttributes(Application_Model_Models_User $user) { $attributes = array(); if ($user->getId()) { $select = $this->getDbTable()->getAdapter()->select()->from('user_attributes', array('attribute', 'value'))->where('user_id = ?', $user->getId()); $data = $this->getDbTable()->getAdapter()->fetchPairs($select); if (!is_null($data)) { $attributes = $data; } } return $user->setAttributes($attributes); }