• Resolved Lafare

    (@lafare)


    Hello,

    I’ve been using that plugin for a while and it proves to be very useful and reliable.

    However, using an other plugin which imports in mass users with debug option enabled, for each imported user a “notice message” complaining that “Notice: Undefined index: user_id in G:\wamp\www\vja\wp-content\plugins\wp-members\admin\user-profile.php on line 207” is emitted.

    This is just because the profile_update action is triggered and $_REQUEST[‘user_id’] is not set.
    I’ve fixed this adding the following instruction at the beginning of the function wpmem_admin_update

    if (!array_key_exists('user_id', $_REQUEST)) return;

    Is it safe to do like this, if yes could you make the patch in a next version of the plugin?

    Thank you by advance.

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author Chad Butler

    (@cbutlerjr)

    Is it safe to do like this,

    I’m not entirely sure as far as what’s happening outside the plugin. However, yes, the $_REQUEST parameter should be checked to see if it is set, and if it is not, the function should exit at that point since with no user ID no user can be updated (at least as far as this function is concerned).

    So I think it’s probably OK, and yes, I will likely make a change in the next release.

    Thread Starter Lafare

    (@lafare)

    Thank you for this quick answer and for considering to add it in the next release.
    For your information, the used plugin is import-users-csv-with-meta.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Bug in wpmem_admin_update ?’ is closed to new replies.