Code to get password history from database:

  $query = db_select('password_policy_history', 'p');
  $query
    ->condition('p.uid', array_keys($accounts)) 
    ->fields('p', array('uid', 'pass', 'created'))
    ->orderBy('created', 'DESC');
    
  foreach ($query->execute() as $record) {
    $accounts[$record->uid]->password_history[] = $record;
  }

The order will be unspecified for multiple passwords submitted in same second.

This affects automated tests where multiple password changes may happen in the same second.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

AohRveTPV’s picture

Status: Active » Needs review
FileSize
500 bytes

  • AohRveTPV committed 2d9cc9a on 7.x-2.x
    Issue #2455045 by AohRveTPV: History entries may not be ordered...
AohRveTPV’s picture

Status: Needs review » Fixed

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.