Could use help pulling info from my zend login system
===

So, I am having a little trouble with my login system. I am doing it with Zend. I am trying to figure out how to retrieve any needed information from a mysql database.

Here is my current code, which retrieves username and password. I need it to grab more than that though, such as picture and bio. Any ideas?

    <?php
    $failed = FALSE;
    if ($_POST) {
      if (empty($_POST['username']) || empty($_POST['password'])) {
	    $failed = TRUE;
      } else {
	  
	    require_once('library.php');
	    
	    try {
	      $auth = Zend_Auth::getInstance();
	      $adapter = new Zend_Auth_Adapter_DbTable($dbRead, 'user', 'username', 'password', 'sha1(?)', 'bio');
	      $adapter->setIdentity($_POST['username']);
	      $adapter->setCredential($_POST['password']);
	      $result = $auth->authenticate($adapter);
	      if ($result->isValid()) {
		    $storage = $auth->getStorage();
	    	$storage->write($adapter->getResultRowObject(array(
		      'username', 'firstname', 'lastname', 'bio')));
		    header('Location: members_only.php');
		    exit;
	      } else {
		    $failed = TRUE;
	      }
	    } catch (Exception $e) {
	      echo $e->getMessage();
	    }
      }
    }
    if (isset($_GET['logout'])) {
      require_once('library.php');
      try {
	    $auth = Zend_Auth::getInstance();
	    $auth->clearIdentity();
      } catch (Exception $e) {
	    echo $e->getMessage();
      }
    }
