Log message #3943845

# At Username Text
# Oct 7th 2016, 12:22 tokam $this->Session->setFlash(
# Oct 7th 2016, 12:05 westy Can you run a seed from a Migration class file?
# Oct 7th 2016, 12:04 westy I'm interested in how to deploy with data being added as well as the table structure, I have several tables that have pre-filled data
# Oct 7th 2016, 12:03 westy Has anyone on here used Migrations and seeds for deployment?
# Oct 7th 2016, 11:53 jameg83 @ypnos thanks I'll try this.
# Oct 7th 2016, 11:51 ypnos jameg83: you could do !empty() instead
# Oct 7th 2016, 11:48 jameg83 The problem is I'd used 'if isset' in my controller but a value of 0 would still cause this to return true as 0 is not null. Basic error.. Sorry guys.
# Oct 7th 2016, 11:44 ypnos that's all it is
# Oct 7th 2016, 11:44 ypnos it is a valid way of debugging to cancel out possible causes
# Oct 7th 2016, 11:44 admad because your suggestion had nothing to do with the problem he was facing, but i guess you thought it was pertinent :slightly_smiling_face:
# Oct 7th 2016, 11:43 ypnos why would you call it random?
# Oct 7th 2016, 11:43 admad s/options/solutions
# Oct 7th 2016, 11:42 admad ypnos: please don't suggest random options :slightly_smiling_face: it confuses someone who's already having trouble debugging/understanding an issue
# Oct 7th 2016, 11:40 jameg83 Please ignore this... The issue is in my controller. Just checked the request body in the dev tools and it's sending value=0. So my view is doing the right thing. The problem it elsewhere. Sorry for confusion.
# Oct 7th 2016, 11:40 admad @jameg83 if you submit without checking the post value will have 0 not 1
# Oct 7th 2016, 11:39 ypnos jameg83: did you try 'default' => false?
# Oct 7th 2016, 11:32 jameg83 Hi everyone. Could any one please explain why the following:- $this->Form->input('shear', ['type' => 'checkbox', 'label' => 'Double Shear?']) returns a hidden field and a checkbox field with the value set to 1? The problem is when adding an entity this is set to true even if it's not checked..
# Oct 7th 2016, 11:30 ndm populating session data works just fine, given that the auth component is configured to use sessions of course
# Oct 7th 2016, 11:28 doonot Hi all. Does anyone know how I can mock $this->Auth in a unit test in CakePHP 3? Putting Auth data into the session does not work as I use $this->Auth->user("id") in my code.
# Oct 7th 2016, 11:26 tokam slackebot: thanks. it works with that
# Oct 7th 2016, 11:24 pat Hi all. Does anyone know how I can mock $this->Auth in a unit test? Putting Auth data into the session does not work as I use $this->Auth->user("id") in my code.
# Oct 7th 2016, 11:16 tokam ok thanks I will try to copy the user agen too
# Oct 7th 2016, 11:12 ndm If a different IP causes the session to be invalidated, then this is likely either something implemented in the application, or you're doing more than just changing the IP.
# Oct 7th 2016, 11:12 ndm @tokam Cakes session handler doesn't check the IP. In 2.x it may check the user agent string in case the `Session.checkAgent` option is enabled, in 3.x there aren't any such tests, only the regular timeout check.
# Oct 7th 2016, 11:02 tokam ok as of I do sent it from an other ip I get logged out :( :D
# Oct 7th 2016, 11:00 tokam string(80) "CAKE=616cesdsdsdsdsddsssssss3;PHPSESSID=bdsdssddsdsssssss"
# Oct 7th 2016, 11:00 tokam the cookies look like this
# Oct 7th 2016, 10:57 tokam *equal
# Oct 7th 2016, 10:57 tokam the request will come from a different ip, but the cookies should be equals
# Oct 7th 2016, 10:57 tokam do I send the cookies right?
# Oct 7th 2016, 10:57 tokam what I ask myself now: Is it enough to send the cookies, to capture the session?
# Oct 7th 2016, 10:57 tokam My intention of sending the cookies with curl (when receiving the boilerplate) is to 1.) also receive flash messages 2.) also receive the authentication state dependant html
# Oct 7th 2016, 10:56 tokam all other pages are generated with cake php
# Oct 7th 2016, 10:56 tokam but it does a curl query to a cake php application with the cookies set of the user
# Oct 7th 2016, 10:56 tokam https://www.aescuvest.de/fuer-ideengeber/ideeeinreichen
# Oct 7th 2016, 10:56 tokam This page is generated with symfony
# Oct 7th 2016, 10:54 dakota I believe it uses an encrypted cookie with the session id stored in it
# Oct 7th 2016, 10:37 tokam Can I if I reproduce the cookies 1:1 highjack the session? (because this is what I want)
# Oct 7th 2016, 10:36 tokam How does cake handle sessions?
# Oct 7th 2016, 10:18 bernat1 PR up
# Oct 7th 2016, 10:18 bernat1 there was a typo in the book, me following the book too closely.