Uploaded image for project: 'In-Portal CMS'
  1. In-Portal CMS
  2. INP-582

Addressing (in code) users "root" and "Guest" using named constants

    XMLWordPrintable

    Details

      Description

      System users "root" (id = -1) and "Guest" (id = -2) are using in In-Portal since it's first version. Despite their popularity we always use their IDs in code and not thinking about creating named constants.

      I say enough to mystic numbers and propose to create constants:

      • USER_ROOT - for "-1" value
      • USER_GUEST - for "-2" value

      I've already did that and replaced all places, where I've found that magic numbers with proposed constants.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                alex Alex
                Reporter:
                alex Alex
                Developer:
                Alex
              • Votes:
                0 Vote for this issue
                Watchers:
                0 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: