# |
May 25th 2017, 17:03 |
megan |
Hey guys :slightly_smiling_face: who's up for joining the stream? $99 for two days of training, and you can send your questions through via slack/email and we will pass it on https://twitter.com/cakephp/status/867642289669251072 |
# |
May 25th 2017, 16:44 |
gustavocp |
i read more here and i understand |
# |
May 25th 2017, 16:43 |
gustavocp |
thank you for explanation @steinkel :-) |
# |
May 25th 2017, 16:42 |
steinkel |
cake supports ids as int autonumeric and uuid's by default |
# |
May 25th 2017, 16:41 |
steinkel |
hey @gustavocp we are using uuid's for a number of reasons, for example you cannot guess the id of another user |
# |
May 25th 2017, 16:40 |
gustavocp |
anyone can explain why cakeDC/users plugin are using char as primary key? I think that pattern is int(xx) with auto_increment for id entity in cakePHP. https://image.prntscr.com/image/ef309a52cdf74146b030a8a705d274cf.png |
# |
May 25th 2017, 16:16 |
igreat |
Ok |
# |
May 25th 2017, 16:15 |
steinkel |
so users can access that action without login first |
# |
May 25th 2017, 16:15 |
steinkel |
you want to set your new register action as public |
# |
May 25th 2017, 16:14 |
steinkel |
@igreat I think your issue is related with > https://book.cakephp.org/3.0/en/controllers/components/authentication.html#making-actions-public |
# |
May 25th 2017, 16:13 |
igreat |
Already followed that, but same issue |
# |
May 25th 2017, 16:10 |
steinkel |
please follow the documented instructions here > https://github.com/CakeDC/users/blob/master/Docs/Documentation/Extending-the-Plugin.md#extending-the-controller |
# |
May 25th 2017, 16:09 |
igreat |
thought it would inherit it from the Users controller |
# |
May 25th 2017, 16:09 |
igreat |
Nope, but I have this in the controller `namespace App\Controller; use CakeDC\Users\Controller\UsersController; class MyUsersController extends UsersController` |
# |
May 25th 2017, 16:08 |
spriz |
any way to make the cake bake output relations like so: https://gist.github.com/Spriz/46a7f27c56548068b2e57627a2cf9d28 ? |
# |
May 25th 2017, 16:08 |
steinkel |
usually in beforeFilter callback |
# |
May 25th 2017, 16:08 |
steinkel |
yes, to specify this action does not require a logged in user |
# |
May 25th 2017, 16:07 |
igreat |
U mean in my controller? |
# |
May 25th 2017, 16:06 |
steinkel |
did you allow the register action using $this->Auth->allow()? |
# |
May 25th 2017, 16:06 |
igreat |
Only the login page loads and other pages says "You are not authorized to access that location." |
# |
May 25th 2017, 16:05 |
igreat |
Now when I navigate to `/my-users/register` it returns "You are not authorized to access that location." |
# |
May 25th 2017, 16:04 |
igreat |
I installed CakeDC Users plugin, then tried to extend it with another controller. |
# |
May 25th 2017, 15:53 |
jeremyharris |
been there |
# |
May 25th 2017, 15:53 |
jeremyharris |
:) |
# |
May 25th 2017, 15:51 |
night_wulfe |
So I'm banging my head against the wall trying to figure out what Timestamp setting or bug I have in my custom behavior that would cause CakePHP to default my 'created' field to two days ago at noon. Then I find this line of debugging code I had left in my controller two days ago :| ``` $organization['created'] = '2017-05-23 12:00:00 PM';``` |
# |
May 25th 2017, 15:46 |
birdy247 |
Then lets get 1 up on laravell :+1: |
# |
May 25th 2017, 15:40 |
dakota |
> new joiner (who was a laravell user) has made the same mistake @birdy247 Laravel has the same problem :slightly_smiling_face: |
# |
May 25th 2017, 15:40 |
jeremyharris |
yeah I can’t find one in the docs |
# |
May 25th 2017, 15:39 |
night_wulfe |
@chris-andre I need the opposite; I need to say the field must not be specified on update. requirePresence only says that it must be specified for create (or update) |
# |
May 25th 2017, 15:39 |
night_wulfe |
@jeremyharris That's what I was thinking. Just wanted to make sure I wasn't missing one. |
# |
May 25th 2017, 15:38 |
jeremyharris |
or requireAbsent perhaps |
# |
May 25th 2017, 15:38 |
jeremyharris |
@night_wulfe I think you’ll need to create your own rule for requireNoPresence |
# |
May 25th 2017, 15:38 |
clementcrown |
thanks @chris-andre , it is now solved |
# |
May 25th 2017, 15:38 |
chris-andre |
@night_wulfe So `->requirePresence('created', 'create')` is not what you are looking for? |
# |
May 25th 2017, 15:35 |
night_wulfe |
Is there a validator to say that a field must not be present? I don't immediately see one in the documentation. Purpose is to say that 'created' is required on create, but must not be specified on update. |
# |
May 25th 2017, 15:34 |
birdy247 |
Google seems to return v2 links higher than v3 for the majority |
# |
May 25th 2017, 15:33 |
birdy247 |
Maybe a different colour? |
# |
May 25th 2017, 15:33 |
megan |
@birdy247 hmm odd! ok I can make a suggestion to the core to look into it |
# |
May 25th 2017, 15:30 |
birdy247 |
If not, how should I do it? |
# |
May 25th 2017, 15:29 |
birdy247 |
Is it "OK" for a shell task to use a Model |
# |
May 25th 2017, 15:28 |
clementcrown |
so let me check my folder permission, thanks |