[Bug][Fix] admin/user.php

Please report bugs here!

Moderator: Thorsten

Post Reply
fffizzz
Posts: 3
Joined: Wed Mar 21, 2012 2:25 pm

[Bug][Fix] admin/user.php

Post by fffizzz »

In the latest 2.8-beta-2, there is a bug preventing you from saving user rights. I had to add the json query into "function getUserData(user_id) {"

below is the updated function, changes are noted to the right with //##

Starting at line 361

Code: Select all

function getUserData(user_id) {
            $('#user_data_table').empty();
            $.getJSON("index.php?action=ajax&ajax=user&ajaxaction=get_user_data&user_id=" + user_id, function(data) {
                $('#update_user_id').val(data.user_id);
                $('#rights_user_id').val(data.user_id); //## This is the addition to the file to make it update rights properly.
                $('#user_status_select').val(data.status);
                $('#user_list_autocomplete').val(data.login);
                $("#user_list_select").val(data.user_id);
                // Append input fields
                $('#user_data_table').append(
                    '<div class="control-group">' +
                        '<label class="control-label"><?php print $PMF_LANG["ad_user_realname"]; ?></label>' +
                        '<div class="controls">' +
                            '<input type="text" name="display_name" value="' + data.display_name + '" required />' +
                        '</div>' +
                    '</div>' +
                    '<div class="control-group">' +
                        '<label class="control-label"><?php print $PMF_LANG["ad_entry_email"]; ?></label>' +
                        '<div class="controls">' +
                            '<input type="email" name="email" value="' + data.email + '" required />' +
                        '</div>' +
                    '</div>' +
                    '<input type="hidden" name="last_modified" value="' + data.last_modified + '" />'
                );
            });
        }
Thorsten
Posts: 15725
Joined: Tue Sep 25, 2001 11:14 am
Location: #phpmyfaq
Contact:

Re: [Bug][Fix] admin/user.php

Post by Thorsten »

Hi,

thanks a lot, we already fixed that :-)

Thanks for testing!

bye
Thorsten
phpMyFAQ Maintainer and Lead Developer
amazon.de Wishlist
Post Reply