Error on numeric usernames

Created on 10 October 2016, about 8 years ago
Updated 30 March 2023, over 1 year ago

db_query of user search fails when user with numeric username is being assigned to a ticket. It could be fixed by changing the logic which checks for input to be UID or USERNAME. It solved my problem by replacing any occurance of is_numeric($node->assigned) by user_load($node->assigned)

Example:

// Autocomplete version
    if (isset($node->assigned) && !is_numeric($node->assigned)) {

change to

// Autocomplete version
    if (isset($node->assigned) && !user_load($node->assigned)) {

this has to be done at several places in support.module code. I don't experience performane issues.
I wish someone could build a patch with a more advanced solution!!!

📌 Task
Status

Closed: outdated

Version

1.0

Component

Code

Created by

🇩🇪Germany airsplitter

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.

Production build 0.71.5 2024