Log message #4203417

# At Username Text
# Sep 16th 2019, 19:37 jotpe Well, it finds it.
# Sep 16th 2019, 19:36 ricksaccous are you sure the model is using that Entity?
# Sep 16th 2019, 19:36 slackebot <jotpe>
# Sep 16th 2019, 19:36 ricksaccous are you sure your naming is correct?
# Sep 16th 2019, 19:36 ricksaccous are you sure it's namespaced correctly?
# Sep 16th 2019, 19:36 jotpe Clearing the Cache didn't help. I remember I had the same problem and it was something with the Object.
# Sep 16th 2019, 19:35 ricksaccous if you do a find on the model without specifying select fields do you get "status" back?
# Sep 16th 2019, 19:35 ricksaccous did you clear your cache? did you recently add that column?
# Sep 16th 2019, 19:35 jotpe Yeah, i was testing. but the thing is....it didn't even get into that function
# Sep 16th 2019, 19:34 ricksaccous you should be able to do $entity->status = 'possible_enum'; without that
# Sep 16th 2019, 19:34 ricksaccous curious why you're even using that set... since it isn't mutating anything...
# Sep 16th 2019, 19:34 jotpe the field is an enum
# Sep 16th 2019, 19:34 jotpe also $_accessible
# Sep 16th 2019, 19:33 jotpe yes
# Sep 16th 2019, 19:33 ricksaccous do you have a status field in the schema?
# Sep 16th 2019, 19:33 jotpe I want to set the status of the mailaddress
# Sep 16th 2019, 19:33 jotpe https://book.cakephp.org/3.0/en/orm/entities.html#Cake\ORM\Entity::set
# Sep 16th 2019, 19:33 jotpe Yes.
# Sep 16th 2019, 19:32 ricksaccous getters are when you want to create new virtual fields based on existing properties
# Sep 16th 2019, 19:31 ricksaccous setters are for when you want to modify an existing property and spit that out
# Sep 16th 2019, 19:28 jotpe I know it was something with an Object/Enity, but can't remember. Anyone knows?
# Sep 16th 2019, 19:28 jotpe For some reason I got `Call to undefined method Users\Model\Entity\Emailaddress::status()`
# Sep 16th 2019, 19:27 slackebot <jotpe>
# Sep 16th 2019, 19:27 jotpe I've got a setter in my Entity for a field:
# Sep 16th 2019, 18:36 ricksaccous @maymeow i've never tried to do that but i found this https://github.com/naneau/php-obfuscator
# Sep 16th 2019, 18:30 maymeow i need advise. I have php application but i want protect some code from altering by users. Can be done something like this in php? (its problem because php apps is distributed as plain text not in compiled form)
# Sep 16th 2019, 18:08 henri.mjr I understand.. worked now, thanks
# Sep 16th 2019, 18:05 ricksaccous you can never do it the way you are attempting regardless since request data is immutable
# Sep 16th 2019, 17:59 henri.mjr argh.. token was not accessible!
# Sep 16th 2019, 17:56 henri.mjr uhmm
# Sep 16th 2019, 17:56 ricksaccous yes, $this->request/$this->getRequest() are immutable
# Sep 16th 2019, 17:55 admad @henri.mjr `$data = $this->request->getData()' unset($data['token'], $data['time_out']); $user = $this->Usuarios->patchEntity($user, $data);`
# Sep 16th 2019, 17:43 henri.mjr $user['token'] is filled :(
# Sep 16th 2019, 17:42 henri.mjr Hello! How it's the correct way to unset a field before patch? `$this->request->data['token'] = null;` ` $this->request->data['token_timeout'] = null;` ` $user = $this->Usuarios->patchEntity($user, $this->request->getData());`
# Sep 16th 2019, 17:36 jotpe Thanks for your help, @javier.villanueva
# Sep 16th 2019, 17:36 jotpe $confirmationsTable = TableRegistry::getTableLocator()->get('Users.EmailaddressConfirmations');
# Sep 16th 2019, 17:36 jotpe it's always the same. I run into the trap of not specifiying the plugin when getting the table...
# Sep 16th 2019, 17:35 jotpe DAMN.
# Sep 16th 2019, 17:20 javier.villanueva yes... if you dont want save two times, you can use a database trigger
# Sep 16th 2019, 17:20 jotpe Wait
# Sep 16th 2019, 17:20 jotpe So i have to set before