Credo che derivi da questa condizione
Codice PHP:
mysql_affected_rows($connection) == 

In pratica la funzione mysql_affected_rows ti dice il numero di record (righi/rows) modificati dalla tua query. Essendo che non hai modificato la password i righi modificato sono - appunto - 0 zero!

Ti cito il manuale ufficiale
When using UPDATE, MySQL will not update columns where the new value is the same as the old value. This creates the possibility that mysql_affected_rows() may not actually equal the number of rows matched, only the number of rows that were literally affected by the query.
Fonte: http://us1.php.net/mysql_affected_rows

Soluzione... due possibili:
1. semplicemente elimina quella condizione.
2. esegui un controllo preventivo