For instance: realname_registration.module, line 556
$firstname = db_result(db_query("
SELECT %s
FROM node AS n
LEFT JOIN content_type_profile AS c
[...]
Should be:
$firstname = db_result(db_query("
SELECT %s
FROM {node} AS n
LEFT JOIN {content_type_profile} AS c
[...]

The SELECT fails with a user warning: "Table 'mydb.node' doesn't exist"

Comments

sgerbino’s picture

You are absolutely right, I realized this issue when using shared tables a few days ago. I will be fixing this code at the next chance I get. Thanks for reporting the issue (and solution). I will close the thread after I've committed the fixes.

sgerbino’s picture

Status: Active » Closed (fixed)
tito.brasolin’s picture

Thank you Steve.

In the meanwhile I realized that the profile type is configurable, so this should be a more complete solution (but I haven't thoroughly tested it yet):
[...]
$realname_profile_type = variable_get('realname_profile_type', '');
[...]
$firstname = db_result(db_query("
SELECT {$firstname_field}_value
FROM {node} AS n
LEFT JOIN {content_type_{$realname_profile_type}} AS c
[...]

sgerbino’s picture

Status: Closed (fixed) » Needs review

Ah, I see I'm going to re-open this issue until I test it out and/or fix it.

sgerbino’s picture

Title: Missing many curly braces on SQL » Token query fails on Profile types other than 'profile'
Status: Needs review » Closed (fixed)

I just pushed some changes that should resolve the issue, it will stay in the dev branch until I address the other issues in the queue.