Improve compatibility between 'user' and 'password policy tab' modules
This commit is contained in:
parent
56910ad47f
commit
7ac2bb7013
3 changed files with 15 additions and 3 deletions
|
@ -513,7 +513,18 @@ function password_policy_cron() {
|
|||
}
|
||||
|
||||
// Get all users' last password change time. We don't touch blocked accounts
|
||||
$result = db_query("SELECT u.uid AS uid, u.created AS created_u, p.created AS created_p, e.pid AS pid, e.warning AS warning, e.unblocked AS unblocked FROM {users} u LEFT JOIN {password_policy_history} p ON u.uid = p.uid LEFT JOIN {password_policy_expiration} e ON u.uid = e.uid WHERE u.uid > 0 AND u.status = 1 ORDER BY p.created ASC");
|
||||
$result = db_query('
|
||||
SELECT u.uid AS uid,
|
||||
u.created AS created_u,
|
||||
p.created AS created_p,
|
||||
e.pid AS pid,
|
||||
e.warning AS warning,
|
||||
e.unblocked AS unblocked
|
||||
FROM {users} u
|
||||
LEFT JOIN {password_policy_history} p ON u.uid = p.uid
|
||||
LEFT JOIN {password_policy_expiration} e ON u.uid = e.uid
|
||||
WHERE u.uid > 0 AND u.status = 1 ORDER BY p.created ASC
|
||||
');
|
||||
while ($row = db_fetch_object($result)) {
|
||||
if ($row->uid == 1 && !variable_get('password_policy_admin', 0))
|
||||
continue;
|
||||
|
|
Reference in a new issue