Results 1 to 4 of 4

Thread: Double Dependency Injection?

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #2
    Assadministrator kung foo man's Avatar
    Join Date
    Jun 2012
    Location
    trailerpark
    Posts
    2,011
    Thanks
    2,102
    Thanked 1,084 Times in 753 Posts
    PHP Code:
    $_SESSION[user] = $userService->getUser(); 
    A session entry is a serialized piece of data, which cannot hold any resource variables. Either read the stuff you need directly at login time and serialize it into $_SESSION (when the resource is still valid), or, better way IMHO, read the stuff you need every time a user opens the page, so you don't have any out-of-sync data.
    timescale 0.01

  2. The Following User Says Thank You to kung foo man For This Useful Post:

    Whiskas (20th November 2016)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •