Log message #4033380

# At Username Text
# 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. :)
# May 29th 2017, 10:51 hmic attach there
# May 29th 2017, 10:51 bernat hmic: what if it's just for a model?
# May 29th 2017, 10:39 hmic bernat, if you need them to be attached applicationwide, sure
# May 29th 2017, 10:07 bernat Hi. I'm starting to use events in cakephp3. Is it common practice to attach listeners in the bootstrap file?
# May 29th 2017, 09:10 medic thanks @kareylo . I will test it.
# May 29th 2017, 09:08 kareylo @medic https://book.cakephp.org/3.0/en/core-libraries/collections.html#Cake\Collection\Collection::chunk
# May 29th 2017, 08:53 medic I'm talking using a cakephp sql statement.
# May 29th 2017, 08:51 hmic with the orm the results are streamable, so you can use the technique i was talking about too: chunk the result (collection!) of your query and save the chunks individually, instead of all records at once.