• Thanks for this plugin. I’m currently experiencing an error with the setting for logged in users. When this check box is unchecked (i.e. anyone visitor should see Freshchat), I’m receiving an undefined index error.

    The setting is for

    Enable chat only for logged in Users [unchecked]

    The resulting error is

    Notice: Undefined index: loggedin_user in ../wp-content/plugins/freshchat/widget-settings/settings.php on line 18

    • This topic was modified 5 years, 7 months ago by Will Neill.
Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author freshchat

    (@freshchat)

    @willneill this issue has be fixed can you please update freshchat plugin and check

    Thread Starter Will Neill

    (@willneill)

    Thanks @freshchat – seems to be working now.

    The error is back, you need to validate your code:

    
    function get_fc_user_identify()
    {
      $current_user = wp_get_current_user();
      $user_meta = get_user_meta($current_user->ID, "restore_id");
      if ($current_user->user_email) {
        $sanitized_email = sanitize_email($current_user->user_email);
        echo "<script>\n";
        echo "window.fcSettings.externalId ='".sanitize_text_field($sanitized_email)."';\n";
        echo "window.fcSettings.restoreId ='".sanitize_text_field($user_meta[0])."';\n";

    The $user_meta variable isn’t valid if there is no current user. That’s why you get the warning on row 15

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Error with logged in / out user option’ is closed to new replies.