title: Zend Authentication and Login - accepts foo and foo1! both for a saved foo password
body: <p>I'm trying to script an authentication and login script and am quiet there.. I have a password 'password' saved in my database... it works with the password 'password' however should not work with 'password1!' or prefix or suffix two characters more.... IT shouldn't accept it... but if I enter something different (different string, or a few more characters), it gives me a proper error... </p>
  
  <p>That is the only row in my database table... there are no duplicate entries..</p>
  
  <p>Following is the code </p>
  
  <pre><code>public function validate_login($valuethrown) {
  
      $username = $valuethrown['username'];
      $email = $valuethrown['email'];
      $password = $valuethrown['password'];
  
      echo "Values thrown to the model are : $username, $email, $password";
      $authAdapter = $this-&gt;getAuthAdaptor();
      $authAdapter-&gt;setIdentity($email)
              -&gt;setCredential(md5($password));
      $auth = Zend_Auth::getInstance();
      $result = $auth-&gt;authenticate($authAdapter);
      if ($result-&gt;isValid()) {
          $data = $authAdapter-&gt;getResultRowObject(null,'password');
          $auth-&gt;getStorage()-&gt;write($data);
          $this-&gt;_redirect('home');
      } else {
          echo "&lt;/br&gt;Wrong Password&lt;/br&gt;";
      }
      //check login details
  }
  
  public function getAuthAdaptor() {
      $authAdapter = new Zend_Auth_Adapter_DbTable(Zend_Db_Table::getDefaultAdapter());
      $authAdapter-&gt;setTableName('users')
              -&gt;setIdentityColumn('email')
              -&gt;setCredentialColumn('password');
      return $authAdapter;
  }
  </code></pre>
  
  <p>HELP!!!!</p>