Only the default target role is accepted

Created on 5 February 2009, almost 16 years ago
Updated 26 August 2024, 5 months ago

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)

🐛 Bug report
Status

Closed: duplicate

Version

2.0

Component

Code

Created by

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

No activities found.

Production build 0.71.5 2024