• Resolved jontasc

    (@jontasc)


    In the method UR_Admin_User_Manager::save_status there is a small bug that results in a hook not being called correctly when a user is approved:

    $action_label = '';
    $action_label = ( $status == UR_Admin_User_Manager::APPROVED ) ? 'approved' : '';
    $action_label = ( $status == UR_Admin_User_Manager::DENIED ) ? 'denied' : '';

    The second line sets $action_label to ‘approved’ but then the third one sets it back to empty string.

    This should probably be changed to something like:

    $action_label = '';
    switch ($status) {
        case UR_Admin_User_Manager::APPROVED:
            $action_label = 'approved';
            break;
    
        case UR_Admin_User_Manager::DENIED:
            $action_label = 'denied';
            break;
    }
    • This topic was modified 6 years, 4 months ago by jontasc.
    • This topic was modified 6 years, 4 months ago by jontasc.
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • The topic ‘I found a small bug in your plugin’ is closed to new replies.