# |
Jan 30th 2014, 10:54 |
mini-me |
so how can I check if a helper exists? (or was loaded correctly) |
# |
Jan 30th 2014, 10:53 |
mini-me |
but I need to test if a helper exists before loading it, else it throws a blank page error (instead of me throwing an exception telling me whats wrong), |
# |
Jan 30th 2014, 10:53 |
mini-me |
I'm using smarty and trying to construct my helper methods, so I can use "{$form->create()}" (for example) |
# |
Jan 30th 2014, 10:52 |
mini-me |
is there anyway to check if a helper exists? |
# |
Jan 30th 2014, 10:39 |
Vikky |
i got pissed off in sending mails |
# |
Jan 30th 2014, 10:39 |
Vikky |
ok let me try this again |
# |
Jan 30th 2014, 10:38 |
Neon1024 |
If you are using find('first') it will, yes, as it will only return a single user, rather than a collection of users |
# |
Jan 30th 2014, 10:38 |
Vikky |
and in new_lead.ctp will it work $user['User']['username'] |
# |
Jan 30th 2014, 10:37 |
Neon1024 |
Then perhaps your user is not logged in, the AuthComponent not loaded properly, or the component is not attached to the correct controller |
# |
Jan 30th 2014, 10:36 |
Neon1024 |
$this->User->find('first', array('conditions' => array('id' => $this->Auth->user('id')))) |
# |
Jan 30th 2014, 10:36 |
Vikky |
i did this but was not able to get the current user |
# |
Jan 30th 2014, 10:36 |
Neon1024 |
If the user is logged in using the AuthComponent you can get the user id from there |
# |
Jan 30th 2014, 10:36 |
Vikky |
how to point to current user |
# |
Jan 30th 2014, 10:35 |
Neon1024 |
If you are just after a single user just do find('first') |
# |
Jan 30th 2014, 10:35 |
Vikky |
? |
# |
Jan 30th 2014, 10:35 |
Vikky |
so what should i do/ |
# |
Jan 30th 2014, 10:35 |
Neon1024 |
findAll returns a numerically indexed array |
# |
Jan 30th 2014, 10:35 |
Neon1024 |
Vikky: This is because you are using a findAll and then trying to access a single user |
# |
Jan 30th 2014, 10:26 |
Vikky |
any help http://bin.cakephp.org/view/1143653424 |
# |
Jan 30th 2014, 10:24 |
Vikky |
hey i am not getting current user information in mails plz help http://bin.cakephp.org/view/1143653424 |
# |
Jan 30th 2014, 10:07 |
themojowill |
lol |
# |
Jan 30th 2014, 10:07 |
themojowill |
aight |
# |
Jan 30th 2014, 10:07 |
Neon1024 |
Your hunt for bitches continues themojowill |
# |
Jan 30th 2014, 10:07 |
mini-me |
morning mofo |
# |
Jan 30th 2014, 10:03 |
themojowill |
morning bitches |
# |
Jan 30th 2014, 09:51 |
mobasher |
Neon1024: thanks |
# |
Jan 30th 2014, 09:50 |
Neon1024 |
You know with the whole what is happening, what are you expecting and how you are using the code |
# |
Jan 30th 2014, 09:50 |
Neon1024 |
Or just write up a nice concise ticket on Github :) |
# |
Jan 30th 2014, 09:50 |
Neon1024 |
Try to nail down the issue as best you can beforehand |
# |
Jan 30th 2014, 09:49 |
Neon1024 |
Well he's in Germany, so probably around now, but he's a very busy chap |
# |
Jan 30th 2014, 09:48 |
mobasher |
how can i know he is around? |
# |
Jan 30th 2014, 09:48 |
Neon1024 |
If burzum is around today at some point you might want to double check your finding with him as he maintains the plugin :) |
# |
Jan 30th 2014, 09:47 |
Neon1024 |
s/component/plugin/ |
# |
Jan 30th 2014, 09:47 |
Neon1024 |
Indeed, as have I, which I why I believe there is an issue in the Users component - but as I said I haven't had time to debug it yet to confirm it or PR a fix |
# |
Jan 30th 2014, 09:46 |
mobasher |
cooki component is ok because i used the cookie in other projects i handled the remember me myself but this time i used the remember me components and i have problems! |
# |
Jan 30th 2014, 09:46 |
Neon1024 |
Although I would expect tests to pass before release, but you never know :p |
# |
Jan 30th 2014, 09:46 |
Neon1024 |
Plus you can run them to see if the component still passes |
# |
Jan 30th 2014, 09:46 |
Neon1024 |
That will give you an idea of what the components expected behaviour is |
# |
Jan 30th 2014, 09:46 |
Neon1024 |
Might be worth checking the CookieComponent unit tests |
# |
Jan 30th 2014, 09:45 |
mobasher |
no i am using 2.4.4 |
# |
Jan 30th 2014, 09:45 |
Neon1024 |
Are you running 2.4.5 ? |