Simple Machines Community Forum

Customizing SMF => SMF Coding Discussion => Topic started by: Biology Forums on September 20, 2019, 02:08:05 PM

Title: SendPM Issue 1.x
Post by: Biology Forums on September 20, 2019, 02:08:05 PM
SendPM is throwing the error $txt['pm_error_user_not_found'] when there's a space between the name.

Here's the part that corresponds to the function.

$request = db_query("
SELECT ID_MEMBER, memberName
FROM {$db_prefix}members
WHERE memberName IN ('" . implode("', '", array_keys($usernames)) . "')", __FILE__, __LINE__);


On 2.x, we have:

$request = $smcFunc['db_query']('pm_find_username', '
SELECT id_member, member_name
FROM {db_prefix}members
WHERE ' . ($smcFunc['db_case_sensitive'] ? 'LOWER(member_name)' : 'member_name') . ' IN ({array_string:usernames})',
array(
'usernames' => array_keys($usernames),
)
);


How are the two different?

Is this an known issue? What are your suggestions?

By the way, there are spaces in the name because a social login mod does it that way.
Title: Re: SendPM Issue 1.x
Post by: Herman's Mixen on September 20, 2019, 06:20:42 PM
SMF 1.x is an total other Engine then SMF 2.x so there is the difference
Title: Re: SendPM Issue 1.x
Post by: Mick. on September 20, 2019, 07:50:02 PM
I thought social login mod only supports 2.0 only?  I use it with no errors on 2.0.

The calls are diff.

SELECT ID_MEMBER, memberName   1.0

SELECT id_member, member_name 2.0

Ditch 1.0. SMF stopped supporting it and updating it.
Title: Re: SendPM Issue 1.x
Post by: Biology Forums on September 22, 2019, 09:47:54 PM
Hi all

Error had nothing to do with the engine being 1.x-based. The mod wasn't calling the correct text file -- that's all.

Thanks for the responses