# |
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 |
# |
Sep 16th 2019, 17:20 |
jotpe |
I guess that should break the foreign key constraint |
# |
Sep 16th 2019, 17:20 |
javier.villanueva |
fuck return |
# |
Sep 16th 2019, 17:19 |
javier.villanueva |
if ($confirmationTable->save($confirmation)) { $confirmation->emailaddress_id = $confirmation->id; } |
# |
Sep 16th 2019, 17:18 |
javier.villanueva |
I dont know if is possible |
# |
Sep 16th 2019, 17:17 |
javier.villanueva |
with a field or the same entity |
# |
Sep 16th 2019, 17:17 |
javier.villanueva |
do you want to set this field always (auto) |
# |
Sep 16th 2019, 17:17 |
javier.villanueva |
ok I understand now |
# |
Sep 16th 2019, 17:16 |
jotpe |
'emailaddress_id' => $entity->id |
# |
Sep 16th 2019, 17:16 |
jotpe |
I set the entity_id when creating the newEntity |
# |
Sep 16th 2019, 17:15 |
javier.villanueva |
it creates the protection entity with emailaddress_id to "null"? |
# |
Sep 16th 2019, 17:15 |
jotpe |
yes |
# |
Sep 16th 2019, 17:15 |
slackebot |
<jotpe> |
# |
Sep 16th 2019, 17:15 |
javier.villanueva |
the new confirmation? |
# |
Sep 16th 2019, 17:14 |
javier.villanueva |
and the entity is created? |
# |
Sep 16th 2019, 17:14 |
jotpe |
I have |
# |
Sep 16th 2019, 17:14 |
javier.villanueva |
because this is the solution |
# |
Sep 16th 2019, 17:13 |
jotpe |
yes |
# |
Sep 16th 2019, 17:13 |
javier.villanueva |
check if you has access to this field in Entity |
# |
Sep 16th 2019, 17:07 |
jotpe |
Unfortunately setting the field in the constructor didn't worked |
# |
Sep 16th 2019, 17:06 |
slackebot |
<jotpe> |
# |
Sep 16th 2019, 17:05 |
jotpe |
When I create a new Entity with NewEntity() I want to automatically set a field in the entity. How can I do that? |
# |
Sep 16th 2019, 16:37 |
daniel.upshaw |
Found this too @felipe.marinho https://github.com/WyriHaximus/cakephp-async-orm |
# |
Sep 16th 2019, 16:36 |
felipe.marinho |
@dan I'll check this option... |
# |
Sep 16th 2019, 16:36 |
felipe.marinho |
After 3 minutes executing this action I'm receiving and EMPTY RESPONSE in my browser, but if I try to reload the page, the script still working for more 3 minutes... and after the execution of the script is done the page works perfect. I don't know how to solve it, I changed every timeout in my server, keep-alive-http, everything, and I still receiving this empty response after exact 3 minutes. |
# |
Sep 16th 2019, 16:33 |
daniel.upshaw |
@felipe.marinho Like this concept? https://reactphp.org/ |
# |
Sep 16th 2019, 16:29 |
felipe.marinho |
Hey guys... how can I create an asyncronous action/script? |
# |
Sep 16th 2019, 15:27 |
daniel.upshaw |
Thanks |
# |
Sep 16th 2019, 15:26 |
ricksaccous |
if you run into trouble then feel free to ask questions |
# |
Sep 16th 2019, 15:26 |
daniel.upshaw |
Lol fair enough |
# |
Sep 16th 2019, 15:26 |
ricksaccous |
just copy and paste from the docs, lol |
# |
Sep 16th 2019, 15:25 |
daniel.upshaw |
But it's outdated it seems |
# |
Sep 16th 2019, 15:25 |
daniel.upshaw |
There's this Udemy course: https://www.udemy.com/course/cakephp-3-tutorial-with-user-authentication-and-admin/ |