i've installed this mod, and i use without problems, great job.
I received a pm from a user whose nickname is "Cuore T'Oro", with quote "'".
When i try to reply, the system gives me a "not existing user Cuore T\'Oro"
I found in the mod these lines:
- Code: Select all
while ( !empty($to_username_array[$n]) )
{
$to_username_array[$n] = trim ($to_username_array[$n]);
$to_usernames .= (($to_usernames) ? "," : "" ) . "'" . $to_username_array[$n++]."'";
}
$sql = "SELECT username, user_id, user_notify_pm, user_email, user_lang, user_active
FROM " . USERS_TABLE . "
WHERE username IN (" . str_replace("\'", "''", $to_usernames) . ")
AND user_id <> " . ANONYMOUS." ORDER BY username ASC" ;
if( !($result2 = $db->sql_query($sql)) )
{
message_die(GENERAL_ERROR, 'Could not obtain users PM information', '', __LINE__, __FILE__, $sql);
}
// verify all names are found
$to_users = $db->sql_fetchrowset($result2);
$db->sql_rowseek(0,$result2);
$n=0;
while ( $to_username_array[$n] && !$error)
{
if (strcasecmp($to_users[$n]['username'],$to_username_array[$n]))
{
$error = TRUE;
$error_msg .= $lang['No_such_user']." '".$to_username_array[$n]."'";
}
$n++;
}
I think there is something wrong here.
What should i do to send pm to users with quotes (previously, with no modded privmsg.php i do)?
Thanks.
LuVi


