Log message #4033388

# At Username Text
# May 29th 2017, 12:47 inoas depends
# May 29th 2017, 12:47 chris-andre Okay. One thing first then: Do you agree that session data should match the current user data in db?
# May 29th 2017, 12:45 hmic point beeing: he should rather trigger an event to reload database data into the session, or go with database sessions from the start, which solves the problem in one go. i'd prefer memcache over sql sessions still, easy to invalidate on update and repopulate and way better suited for the task
# May 29th 2017, 12:45 chris-andre Hmm.. Brain is boiling now :P
# May 29th 2017, 12:44 dereuromark as long as it is safe ;)
# May 29th 2017, 12:44 hmic :p
# May 29th 2017, 12:44 dereuromark who are we to judge
# May 29th 2017, 12:43 hmic still, its a bad idea to do so.
# May 29th 2017, 12:43 dereuromark maybe he doesnt have to :slightly_smiling_face:
# May 29th 2017, 12:43 hmic you will not be able to scale *at all* with this approach
# May 29th 2017, 12:43 hmic chris-andre: this is a bad idea. very bad!
# May 29th 2017, 12:43 chris-andre I'm going back to the "original idea", using join table. The purpose is that the user sessions always shall be updated with currently saved data in database.
# May 29th 2017, 12:41 chris-andre Right. I will always take his advice ;)
# May 29th 2017, 12:41 inoas maybe there is something that fits your bill already - or something you can learn from
# May 29th 2017, 12:40 inoas also take a look at awesome cakephp
# May 29th 2017, 12:40 inoas just create real foreign key constraints and a join table if necessary
# May 29th 2017, 12:40 inoas and can use the cakephp database backed sessions
# May 29th 2017, 12:40 inoas if you do not need anything particular about sessions
# May 29th 2017, 12:40 inoas I think dereuromark is spot on
# May 29th 2017, 12:36 chris-andre So far, when logging in, I use a component to create a record in sessions_users. Beforefilter, in appController I use `$this->UpdateAuth->checkFlag()`. Seems ok?
# May 29th 2017, 12:35 chris-andre I will continue working on what you said yesterday.
# May 29th 2017, 12:34 chris-andre Allright. Get it.
# May 29th 2017, 12:34 dereuromark well, you are starting to hack ugly things now when trying to parse that string and alike. it will only poke holes into everything on the lower levels, not sure thats worth it
# May 29th 2017, 12:33 chris-andre Right @dereuromark I have already been working on it with a sessions_users table. But I thought I could rather have a custom handler. But you say No? If so, I'll take your advice.
# May 29th 2017, 12:31 dereuromark I was telling you about a pivot table the other day, to make the matching between session and user, by not touching the session handling more then necessary
# May 29th 2017, 12:31 dereuromark nots exactly how you should probably not do it :slightly_smiling_face:
# May 29th 2017, 12:31 chris-andre Ok. thanks @rchavik
# May 29th 2017, 12:30 chris-andre I'm creating a custom sessionhandler (UserDatabaseSession), and I want to pull the user id out of $data to store it in Sessions.user_id
# May 29th 2017, 12:30 rchavik chris-andre: see php serialize() vs deserialize()
# May 29th 2017, 12:29 chris-andre Is there a smooth way to read a data string like this? `"Config|a:1:{s:4:\"time\";i:1496010967;}Auth|a:1:{s:4:\"User\";a:13:{s:2:\"id\";i:1;s:10:\"first_name\"`
# May 29th 2017, 12:09 inoas (one way data flow/binding and immutability/store copy is good however)
# May 29th 2017, 12:09 inoas redux I have to say is far to abstracted and complex... though we are using it
# May 29th 2017, 12:09 inoas the only js stuff that was too my liking so far was jQuery and ReactJS
# May 29th 2017, 12:00 kareylo I hate expressjs ... :(
# May 29th 2017, 11:47 heter so i needed to separate their sessions
# May 29th 2017, 11:46 heter actually i already found it out, ive had collisision between backend and frontend users (dont ask why they cannot work on same table)
# May 29th 2017, 11:45 dereuromark why is that necessary?
# May 29th 2017, 11:31 heter hi there, Auth Component -> is there any way to change the key on which user is stored ?
# May 29th 2017, 11:09 pedroseco hi guys, anyone using psysh console for debugging?
# May 29th 2017, 10:57 bernat thanks
# May 29th 2017, 10:55 bernat Obviously I was making it harder than it is. :)