We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 21120
    • 30 Posts
    I noticed that after a user changes their information, it updates the members table, but the messages table isn’t updated. Not a huge problem, however, if a post is reported to a moderator, an email is sent out with the wrong information.

    So, in the SMFConnect plugin, i’m trying to have those fields updated in the messages table:

    $userTbl = $smf->getFullTableName("members");
    $msgTbl = $smf->getFullTableName("messages");
    
    $userId = $db->getValue("SELECT ID_MEMBER FROM $userTbl WHERE memberName='".$useremail."'");
    
    $posts = array(
    	'posterName' => $newFullname,
    	'posterEmail' => $useremail
    );
    
    $db->update($posts,$msgTbl,'ID_MEMBER=".$userId."');
    


    For some reason, the getValue() is returning an empty variable...

    The update works fine when i define $userId myself.

    anybody know what’s wrong?