Log message #4180819

# At Username Text
# Mar 26th 2019, 12:13 neon1024 In Cake 3 anything your login method returns is set to the session
# Mar 26th 2019, 12:13 neothermic @neon1024 Narp. Tis not a login method either
# Mar 26th 2019, 12:12 neon1024 @neothermic Do you have debug on? Is your login method collecting too much data, and thus setting a huge object to the session on login?
# Mar 26th 2019, 11:59 egalles thx
# Mar 26th 2019, 11:59 egalles but maybe you re right when data is variable to use always from single source
# Mar 26th 2019, 11:58 egalles because I use auth component to get data from other views
# Mar 26th 2019, 11:56 neothermic Hmm. I ponder why _startSession() is taking 3s+ when I'm using memcache for sessions ¬_¬
# Mar 26th 2019, 11:53 dereuromark why not reading always from single source of truth (DB) then for this? sounds simpler and easier.
# Mar 26th 2019, 11:51 egalles in appcontroller?
# Mar 26th 2019, 11:51 egalles function beforeFilter(){ $user = $this->User->field('name', array('User.id' => $this->Session->read('Auth.User.id'))); $this->Session->write('Auth.User', $user); }
# Mar 26th 2019, 11:51 egalles maybe this way?
# Mar 26th 2019, 11:49 egalles for example, user 1 has 10 tickets if i waste 1 then i want in all site that shows 9 but when i Change of view session does not change and stills show me 10 instead of 9 that is what i have in database, but value is still in session
# Mar 26th 2019, 11:48 egalles Hi there, I'm having a little problem maybe someone can help me about that, I think that it's a noob problem but I want to resolve it asap. I want to write the component Auth so when I have some data there I can manipulate it. Do you know if I do a Session.write of the object session auth if I can do that?
# Mar 26th 2019, 11:26 dereuromark based on that group/role flag you can also load additional join tables and stuff with custom data per role, whatever. but never have more than one primary users table.
# Mar 26th 2019, 11:25 dereuromark jep, always.
# Mar 26th 2019, 11:25 lubos so you would go with `users` table and admin flag or some group, right? :slightly_smiling_face: that makes sense :slightly_smiling_face:
# Mar 26th 2019, 11:24 dereuromark this is usually an anti-pattern for all apps and frameworks :slightly_smiling_face:
# Mar 26th 2019, 11:24 lubos and is it possible to use 2 tables for users with same tinyauth config? i mean e.g. `users` and `members` if you see what I mean?
# Mar 26th 2019, 11:24 ondrej.nedvidek oh I see .. thanks for hint ;)
# Mar 26th 2019, 11:21 dereuromark but they would still be merged together, as they contain different data, that is not an issue for you.
# Mar 26th 2019, 11:20 dereuromark it would still be the same file, just two sections (top vs bottom), usually. you can use multiple files if you want to, as per docs.
# Mar 26th 2019, 11:16 ondrej.nedvidek @dereuromark Hi Mark, I would like to use TinyAuth for frontend and admin. So there will be admin acl.ini and frontend acl.ini. How would you set the config for this? I mean, bootstrap does not seem to be option as I need to load one or other, depends what controllers are called.
# Mar 26th 2019, 10:47 challgren You cant use both https://book.cakephp.org/3.0/en/controllers/middleware.html#cross-site-request-forgery-csrf-middleware
# Mar 26th 2019, 10:40 challgren Pick either Application.php middleware stack or Routing scope.
# Mar 26th 2019, 10:40 challgren There’s where your Csrf Middleware is being added, set your config there too
# Mar 26th 2019, 10:39 scuadra this is at the top of Router::scope
# Mar 26th 2019, 10:39 scuadra $routes->registerMiddleware('csrf', new CsrfProtectionMiddleware());
# Mar 26th 2019, 10:38 challgren Check in your routes.php
# Mar 26th 2019, 10:37 scuadra @challgren, I am not using any specific plugins
# Mar 26th 2019, 10:34 challgren Morning @neon1024
# Mar 26th 2019, 10:29 neon1024 The component has been replaced by the MIddleware. Perhaps that’s where your confusion is
# Mar 26th 2019, 10:28 neon1024 So you’re using the CSRF Middleware and getting a CSRF error :thinking_face:
# Mar 26th 2019, 10:28 neon1024 Morning all
# Mar 26th 2019, 10:24 challgren What plugins you using?
# Mar 26th 2019, 10:17 scuadra How to fix this error?
# Mar 26th 2019, 10:17 scuadra Hi all. In Cake 3.7 i am getting error CSRF token mismatch doing POST request. I am not using CSRF component as suggested here (https://stackoverflow.com/questions/52326038/cakephp-3-6-csrf-token-mismatch-in-post-request). I only have ->add(new CsrfProtectionMiddleware(['httpOnly' => true])) in middleware() function in src/Application.php.
# Mar 25th 2019, 21:10 chrisshick I would think it would build the query and let MySQL return the result
# Mar 25th 2019, 21:09 ricksaccous if you are just connecting records, then it depends on how the form looks, but i don't see a problem with patchEntity @marek.sebera
# Mar 25th 2019, 21:08 marek.sebera cool, no problem
# Mar 25th 2019, 21:08 chrisshick Yeah... it seems the subquery executes first and then cake injects into the main query
# Mar 25th 2019, 21:08 ricksaccous yeah that's kind of a weird use case i guess, wew