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

Load default user persistent settings all at once

    XMLWordPrintable

    Details

    • Type: Task
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 5.2.2-B3
    • Component/s: Optimization
    • Labels:
      None

      Description

      1. add protected "\SessionStorage::$defaultPersistentVars" property of "array" type
      2. in the "\SessionStorage::LoadPersistentVars" method:
        • get "DefaultSettingsUserId" system setting value with fallback to "USER_ROOT" constant value
        • if default user isn't the same as current user, then store persistent settings of above retrieved user in the "\SessionStorage::$defaultPersistentVars" property
      3. in the "\SessionStorage::RecallPersistentVar" method, when handling "$default == ALLOW_DEFAULT_SETTINGS" logic branch:
        • if "$var_name" key exists in "\SessionStorage::$defaultPersistentVars" array, then store it's value under current user using "\SessionStorage::StorePersistentVar" call
        • otherwise set "false" into "$this->PersistentVars[$var_name]" and "return false"
      4. confirm, that these cases work & no more, than 2 SELECT happens from "UserPersistentSessionData" table:
        • non-root user has a persistent setting
        • non-root user doesn't have a persistent setting
        • root user has a persistent setting
        • root user doesn't have a persistent setting

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                alex Alex
                Reporter:
                alex Alex
                Developer:
                Erik Snarski [Intechnic]
                Reviewer:
                Alex
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 2h 44m
                  2h 44m