please change
ur_autocomplete.module line: 123

-$n = db_result(db_query(db_rewrite_sql('SELECT u.name FROM {users} u n WHERE u.uid = %d'), $item['uid']));
+$n = db_result(db_query(db_rewrite_sql('SELECT u.name FROM {users} u, {node} n WHERE u.uid = %d'), $item['uid']));

otherwise you'll get error ie. in case hook_form_alter, trying to set default values, for user other then user=1.

Comments

greggles’s picture

Status: Patch (to be ported) » Active

This may suppress the warning, but it is not the right fix. db_rewrite_sql assumes the query is on the node table. When it's not it needs to know the base table.

http://api.drupal.org/api/drupal/includes!database.inc/function/db_rewri...

I suggest using the second and third parameters to db_rewrite_sql so that it knows this is a user level query and uid is the key field.

Also, until this is a patch the status should be "active" (yes, even for small fixes).

greggles’s picture

One note - it could also be the case that the query needs to be modified to somehow actually join to the node table.

I don't know the right fix, but I know the proposed fix is wrong ;)