# |
Jul 13th 2018, 08:17 |
magiq |
since exception has message and return false(stoping event) not |
# |
Jul 13th 2018, 08:16 |
magiq |
I think advantage of exception is clearer error text handling |
# |
Jul 13th 2018, 08:15 |
magiq |
I got action that dispatch event before saving object. What is the best option, throw exception in event to prevent saving or return false and check isStopped event method ? |
# |
Jul 13th 2018, 03:48 |
hmic |
e.g. person, person.company opposed to person, person.company.role - without saving company |
# |
Jul 13th 2018, 03:47 |
hmic |
humbba12: i suppose deelpy nested means you are saving each level, distnat means you are not saving all levels of nesting inbetween |
# |
Jul 13th 2018, 01:12 |
humbba12 |
I was reading the "saving data" documentation and in the saving associations section I read "You can define save distant or deeply nested associations by using dot notation:" so my question is what is the difference between distant and deeply nested associations? |
# |
Jul 12th 2018, 21:25 |
ricksaccous |
how do i set it up so my Authenticate object works instead? |
# |
Jul 12th 2018, 21:25 |
ricksaccous |
I'm trying to get a different class to Authenticate the form than FormAuthenticate |
# |
Jul 12th 2018, 20:58 |
dereuromark |
Long time since I made a tutorial. Maybe someone wants to proofread it? https://www.dereuromark.de/2018/07/12/tutorial-cakephp-tagging/ |
# |
Jul 12th 2018, 20:57 |
ricksaccous |
nevermind i got it, was overthinking it |
# |
Jul 12th 2018, 20:53 |
ricksaccous |
also the directory structure is UslUsers > src > Auth > SubAuth.php |
# |
Jul 12th 2018, 20:53 |
ricksaccous |
how do i reference that in plugin syntax? |
# |
Jul 12th 2018, 20:52 |
ricksaccous |
class SubAuth |
# |
Jul 12th 2018, 20:52 |
ricksaccous |
I have auth in a plugin with namespace UslUsers\Auth; |
# |
Jul 12th 2018, 20:29 |
ricksaccous |
I haven't really used allowMethod |
# |
Jul 12th 2018, 20:29 |
ricksaccous |
I see |
# |
Jul 12th 2018, 20:28 |
zmurphy |
I forgot about is, since I mainly use allowMethod |
# |
Jul 12th 2018, 20:28 |
zmurphy |
That will return true if it's either, not only if it's both, although I could just make two calls and accomplish that |
# |
Jul 12th 2018, 20:27 |
ricksaccous |
;) |
# |
Jul 12th 2018, 20:27 |
ricksaccous |
if $this->request->is(['ajax','post']) I believe |
# |
Jul 12th 2018, 20:26 |
ricksaccous |
yes |
# |
Jul 12th 2018, 20:19 |
zmurphy |
Is there anyway in cake to require a request be both ajax and post? |
# |
Jul 12th 2018, 19:38 |
chris-andre |
@flavius For your information, I got full path to `/users/img` to work now. Don't know what I did different from first time I was trying full path... |
# |
Jul 12th 2018, 19:29 |
dwms |
brasilian |
# |
Jul 12th 2018, 19:29 |
dwms |
brasilina |
# |
Jul 12th 2018, 19:29 |
dwms |
? |
# |
Jul 12th 2018, 19:29 |
dwms |
how to configure currency json return format |
# |
Jul 12th 2018, 19:28 |
dwms |
help |
# |
Jul 12th 2018, 18:32 |
zmurphy |
I've added some caching to one of my queries and now on occasion I get the error `Call to a member function flock() on null` when using the query. Does anyone know what might cause or solve this? |
# |
Jul 12th 2018, 18:14 |
ricksaccous |
hmmmm |
# |
Jul 12th 2018, 18:13 |
ricksaccous |
which should have the request data fed to it |
# |
Jul 12th 2018, 18:13 |
ricksaccous |
I suppose it's in findAuth |
# |
Jul 12th 2018, 18:09 |
ricksaccous |
is it easy in Authorization to authorize based on associated data? where is the best place to do that? |
# |
Jul 12th 2018, 18:03 |
pmoraes |
both are foreign key to companies |
# |
Jul 12th 2018, 18:03 |
pmoraes |
yes |
# |
Jul 12th 2018, 18:03 |
chris-andre |
both columns are foreign keys for an id in companies table? |
# |
Jul 12th 2018, 18:02 |
pmoraes |
company_id and affiliated_company_id |
# |
Jul 12th 2018, 18:02 |
pmoraes |
Affiliated_companies has |
# |
Jul 12th 2018, 18:02 |
chris-andre |
How does your AffiliatedCompanies table look? |
# |
Jul 12th 2018, 18:01 |
pmoraes |
but this association is companies with companies |
# |
Jul 12th 2018, 18:00 |
chris-andre |
className should be set to the model being associated to. |