# |
Jan 4th 2019, 05:20 |
NickBusey |
nevermind `$this->Auth->user()` works as expected |
# |
Jan 4th 2019, 05:08 |
NickBusey |
Hmm, ok this is strange. I am using the api key auth, and it's working. (If I include a valid api_token, I get results back, if I don't, I don't.) However, I can't seem to access the logged in user via normal methods in a controller. `debug($this->request->getSession()->read('Auth'));` returns null |
# |
Jan 4th 2019, 05:07 |
NickBusey |
Ah got that fixed, was the header not making it through correctly |
# |
Jan 4th 2019, 04:35 |
NickBusey |
it's broken again, gah |
# |
Jan 4th 2019, 04:35 |
NickBusey |
If I use the 4 lines at the bottom of https://github.com/CakeDC/auth/blob/master/Docs/Documentation/ApiKeyAuthenticate.md in my AppController, requests time out. If I comment out the bottom line, there's a bunch of 'You are not authorized to access this location' messages displayed on the login page rendered. I swear I had api key auth working, now |
# |
Jan 4th 2019, 00:43 |
asdfgh |
i need to add requirements and a score for each |
# |
Jan 4th 2019, 00:42 |
asdfgh |
i have two tables companies and requirements then i need to create companies_requirements that link both tables. No problem about that but ... in companies_requirements i should add a "score" too the table is: id, company_id, requirement_id, score... how can i handle it in forms? |
# |
Jan 4th 2019, 00:40 |
asdfgh |
hello |
# |
Jan 3rd 2019, 23:58 |
dereuromark |
not sure in what context you are using it, you are missing the whole data around it for being able to give a more concrete answer |
# |
Jan 3rd 2019, 23:56 |
dereuromark |
or sinde the Application then, as ->addPlugin() etc |
# |
Jan 3rd 2019, 23:56 |
dereuromark |
you are confusing sth - https://github.com/dereuromark/cakephp-tinyauth/blob/master/tests/bootstrap.php#L59 |
# |
Jan 3rd 2019, 23:54 |
joopmm |
Call to undefined method Cake\Core\Plugin::addPlugin() |
# |
Jan 3rd 2019, 23:53 |
joopmm |
but does not helped |
# |
Jan 3rd 2019, 23:53 |
joopmm |
i tried to use the suggested way : Application::addPlugin() |
# |
Jan 3rd 2019, 23:52 |
joopmm |
i have this issue: Plugin::load() is deprecated |
# |
Jan 3rd 2019, 23:52 |
joopmm |
hello all |
# |
Jan 3rd 2019, 23:30 |
hippo |
no wait it's not.. sorry, tired and very confused. Heading out but please ping me if anyone else has come across this issue! Thanks <3 |
# |
Jan 3rd 2019, 23:27 |
hippo |
Hmm looks like it's monolog |
# |
Jan 3rd 2019, 23:07 |
hippo |
Both Cake 3.7.1 and PHP 7.1.. weird |
# |
Jan 3rd 2019, 23:05 |
hippo |
Even stranger it only happens on the production server logs, not locally. |
# |
Jan 3rd 2019, 22:44 |
hippo |
nope still there.. |
# |
Jan 3rd 2019, 22:43 |
hippo |
let me just make sure I'm not looking at old logs |
# |
Jan 3rd 2019, 22:43 |
hippo |
latest |
# |
Jan 3rd 2019, 22:15 |
ricksaccous |
what version are you on? |
# |
Jan 3rd 2019, 22:14 |
ricksaccous |
oh heh |
# |
Jan 3rd 2019, 22:13 |
hippo |
Yeah but the line throwing an error is in the core and `if (is_string($event)) {` |
# |
Jan 3rd 2019, 22:11 |
ricksaccous |
use getName instead |
# |
Jan 3rd 2019, 22:11 |
ricksaccous |
it says right there though |
# |
Jan 3rd 2019, 22:09 |
hippo |
Has anyone seen this before: ``` NOTICE Deprecated (): Event::name() is deprecated. Use Event::getName() instead. - /var/www/site/vendor/cakephp/cakephp/src/Event/EventManager.php, line: 308 ``` Don't see anything in slack or in Github.. I'm not sure how to get rid of this deprecation error.. |
# |
Jan 3rd 2019, 19:46 |
ricksaccous |
if i was in Germoney right now I'd totally go to that |
# |
Jan 3rd 2019, 19:35 |
dereuromark |
@megan https://twitter.com/dereuromark/status/1080910250067283970 is the twitter message for the next CakePHP meetup in Frankfurt in 2 weeks. |
# |
Jan 3rd 2019, 18:33 |
jeremyharris |
I use the new authorization/authentication cakephp libraries |
# |
Jan 3rd 2019, 18:26 |
dereuromark |
TinyAuth.AuthUser component and helper |
# |
Jan 3rd 2019, 18:18 |
jamison |
Docs still say best way to access logged-in user outside of controller context is `AuthComponent::user()`, however in 3.7 this method is no longer static. What's everyone using these days? |
# |
Jan 3rd 2019, 18:04 |
dereuromark |
hey, to all plugin developers: do you have prefer lowest check yet in travis? Also useful then: https://github.com/dereuromark/cakephp-queue/pull/206 to assert that you actually test those minimum constraints. |
# |
Jan 3rd 2019, 17:29 |
a.francazi |
oh now i got it, url should have been /review-votes/* and not /reviewvotes/ :slightly_smiling_face: |
# |
Jan 3rd 2019, 17:22 |
a.francazi |
I made a new table review_votes and baked a model and a controller with bake. (ReviewVotesTable, ReviewVote (Entity), ReviewVotesController) When I now try to access $this->ReviewVotes in the controller it gives me false, so I cant do $this->ReviewVotes->newEntity() and all that. What did I do wrong? It usually worked everytime |
# |
Jan 3rd 2019, 17:09 |
jeremyharris |
yes |
# |
Jan 3rd 2019, 17:08 |
Martin` |
is it possible to change the request object in a middleware? |
# |
Jan 3rd 2019, 16:45 |
richardd |
thank you Jeremy! I'm going to give it a try |
# |
Jan 3rd 2019, 16:45 |
murat |
I have an action that has just one `var_dump()` call in it. When I access it through its URL I see the printed output, but when I make an AJAX call to it I get an empty response. What am I doing wrong? |