security/PasswordHistory.php
public static function last($user = null)
    {
        if (!User::isValid($user)) {
            throw new InvalidParamException('User Invalid.');
        }
        return static::find()->createdBy($user)->orderByCreatedAt(SORT_DESC)->one();
    }
public static function last($user = null)
    {
        if (!User::isValid($user)) {
            throw new InvalidParamException('User Invalid.');
        }
        return static::find()->createdBy($user)->orderByCreatedAt(SORT_DESC)->one();
    }
public static function last ( $ user = null ) { if ( ! User :: isValid ( $ user ) ) { throw new InvalidParamException ( 'User Invalid.' ) ; } return static :: find ( ) -> createdBy ( $ user ) -> orderByCreatedAt ( SORT_DESC ) -> one ( ) ; }
Get last password hash.

@param User $user
@return static
@throws InvalidParamException throw if user invalid.
Get last password hash .