- if (a1->flags & a2->flags & M_ACCT_USER)
- return (!m_strcmp(a1->user, a2->user));
- if (a1->flags & M_ACCT_USER)
- return (!m_strcmp(a1->user, user));
- if (a2->flags & M_ACCT_USER)
- return (!m_strcmp(a2->user, user));
+ if (a1->has_user && a2->has_user)
+ return !m_strcmp(a1->user, a2->user);
+ if (a1->has_user)
+ return !m_strcmp(a1->user, user);
+ if (a2->has_user)
+ return !m_strcmp(a2->user, user);