Skip to content

CI4: Session data doesn't persist #3654

Closed

Description

@objecttothis

In stepping through breakpoints, it seems that there is an issue with session userdata not persisting. When you successfully login at the point of redirecting to the home controller, the _SESSION variable person_id is set, but when the home controller's getIndex starts processing the code in it, the person_id is unset. I updated the sessions table to reflect what CI4 says it needs to look at because I thought that was the problem. What's funny to me is that it's inconsistent. Half the time I get an undefined variable error, indicating the session data problem. and the other half the time it keeps the session variable and I go on to the next bug, which for now is in the \app\Models\Employee::has_module_grant() function which does not like a NULL being passed to the Query Builder like() function. This might be a difference between CI3 and CI4.

image

Activity

  1. added this to the 3.4.0 milestone on Feb 7, 2023
  2. objecttothis commented on Feb 8, 2023

    @objecttothis
    MemberAuthor

    Fixed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions