My site hase several roles. Each role has a default target role for invites and a specific target rol depending on the role of the inviter (made possible with http://www.mysite.com/admin/user/invite/settings )

The problem is that an invitee who accepts an invite, is only escalated to the default role, not the specific target role.

I investigated this thouroughly.

The code of the invite.module seems to be correct but the statement

db_query("INSERT INTO {users_roles} (uid, rid) VALUES (%d, %d)", $account->uid, $target);

(about line 522 in a patched module) is only executed for the default value of the target role. For the specific target role, the statement doesn't execute without warning in watchdog. The input of the statement is OK (variables checked with print and print_r).

The problem persists when the the statement is rewritten in native SQL. The same native SQL directly executed on the database is accepted normally.

Who has the same problem and who has an idea of the cause?

My installation:
D6.9,
Invite 6.x-2.x-dev with patches
MySQL 5.0.32
PHP 5.2.6
Apache/1.3.37 (Unix)

Comments

Anonymous’s picture

Duplicate of http://drupal.org/node/330233 were a working solution is given.

smk-ka’s picture

Status: Active » Closed (duplicate)