Profile javascript errors for users with numeric usernames starting with zero

XMLWordPrintable

    • Type: Bug
    • Resolution: Fixed
    • Priority: Low
    • 2.3.1, 2.4.0
    • Affects Version/s: 1.0
    • Component/s: None
    • None

      In screens that show a list of groups that a particular user is a member of, some users will see error popups or the groups simply won't load.

      This is due to some JS that stores the username as an HTML attribute "data-user" and the way jQuery reads these.

      We use $el.data('user'), which for most users returns something like "aahmed". For usernames that are all numbers, like 1234, this returns a number 1234. When the number starts with 0, the 0 is stripped.

      Thus when we use that value anywhere, it's incorrect.

      We should instead use $el.attr('data-user')

            Assignee:
            Adam Ahmed (Inactive)
            Reporter:
            Adam Ahmed (Inactive)
            Votes:
            1 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: