# |
Sep 16th 2019, 19:41 |
jotpe |
Oh damn :( |
# |
Sep 16th 2019, 19:40 |
ricksaccous |
I'm feeling tired but unfortunately I have to chug a lug on for a while |
# |
Sep 16th 2019, 19:40 |
ricksaccous |
it's not good working when you're tired |
# |
Sep 16th 2019, 19:39 |
ricksaccous |
lol |
# |
Sep 16th 2019, 19:39 |
jotpe |
I should go to bed... |
# |
Sep 16th 2019, 19:39 |
jotpe |
Just stupid. My Query is against the Confirmation and not the Email itself |
# |
Sep 16th 2019, 19:38 |
jotpe |
Ah wait |
# |
Sep 16th 2019, 19:37 |
ricksaccous |
ok |
# |
Sep 16th 2019, 19:37 |
jotpe |
The correct Entity |
# |
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);` |