Advertisement:

Author Topic: SendPM Issue 1.x  (Read 306 times)

Offline Biology Forums

  • SMF Hero
  • ******
  • Posts: 3,747
    • StudyForcePS on Facebook
    • @studyforceps on Twitter
SendPM Issue 1.x
« 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.

Code: [Select]
$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:

Code: [Select]
$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.

Offline Herman's Mixen

  • SMF Hero
  • ******
  • Posts: 7,252
    • HermanMixen on Facebook
    • @Hermans_Mixen on Twitter
    • Herman's Mixen
Re: SendPM Issue 1.x
« Reply #1 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
Met vriendelijke groet, The Burglar!

 House Mixes | Mixcloud | Any Intelligent fool can make things bigger, more complex, and more violent.
It takes a touch of genius - and a lot of courage - to move in the opposite direction. - Albert Einstein

Former Godfather of our dutch community ;)

Online Mick.

  • SMF Friend
  • SMF Hero
  • *
  • Posts: 5,026
  • Gender: Male
    • idesignSMF on Facebook
    • @idesign360 on Twitter
    • idesignSMF.com
Re: SendPM Issue 1.x
« Reply #2 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.

Offline Biology Forums

  • SMF Hero
  • ******
  • Posts: 3,747
    • StudyForcePS on Facebook
    • @studyforceps on Twitter
Re: SendPM Issue 1.x
« Reply #3 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