It would be great if we could interact with user_load's query using hook_db_rewrite_sql.
Is this either something deliberately left out for some reason, a bug or a missing feature?

The new query in user.module:

$result = db_fetch_object(db_query(db_rewrite_sql('SELECT * FROM {users} u WHERE ' . implode(' AND ', $query), 'u', 'uid'), $params));

I tested it and seems to work fine.

Comments

pasqualle’s picture

Version: 6.5 » 6.x-dev
Category: feature » bug
dpearcefl’s picture

Is this still an issue using current Drupal 6? Is this change still needed?

Status: Active » Closed (outdated)

Automatically closed because Drupal 6 is no longer supported. If the issue verifiably applies to later versions, please reopen with details and update the version.