WordPress.org

Ready to get started?Download WordPress

Forums

Edit Flow
user groups not selected on edit user page (2 posts)

  1. Fahad Mahmood
    Member
    Posted 11 months ago #

    User ids array is coming empty on edit user page. I create a user group, select users and save. Its perfect but when i go to a specific user which is already in a group, checkbox(es) are not checked. Its working fine when i use edit-flow usergroups but when there are multiple groups listed on edit user page so there is a problem.
    I have checked the code, i think problem is near to $usergroup->user_ids = array();

    Have a look into it, i will get back to you for the fixed version.

    http://wordpress.org/extend/plugins/edit-flow/

  2. Fahad Mahmood
    Member
    Posted 10 months ago #

    I have found the problem and fixed it at my end. My client is using WP Engine hosting, when i was giving demo in staging environment so it was working fine. But when moved to the live site and checked the edit user page, assigned user group(s) were not checked.
    Please look into modules/user-groups/user-groups.php line no. 833.
    For the first time it is good to define an array but once its defined for the same iteration so why should it be overwritten/replaced?

    I just fixed it with
    $usergroup->user_ids = !isset($usergroup->user_ids)?array():$usergroup->user_ids;

    Please check and update if there is a problem on specific hosting(s) with this code.

Reply

You must log in to post.

About this Plugin

About this Topic