# |
Jan 30th 2014, 10:59 |
mini-me |
hmmm, so i'd have to hardcode all the helpers in cakephp and check it against $this->helpers |
# |
Jan 30th 2014, 10:59 |
arnis |
check $this->helpers maybe |
# |
Jan 30th 2014, 10:58 |
mini-me |
how it what possible? |
# |
Jan 30th 2014, 10:58 |
mini-me |
and its not really smarty related, (I just mentioned it to give an idea what I'm doing), the question was, is there anyway to check if a helper exists, or is loaded corectly? |
# |
Jan 30th 2014, 10:58 |
arnis |
how is that possible? |
# |
Jan 30th 2014, 10:58 |
arnis |
lol |
# |
Jan 30th 2014, 10:57 |
mini-me |
since some loser decided to use smarty with cakephp 1.3, now I have to deal with this crap |
# |
Jan 30th 2014, 10:57 |
arnis |
mini-me: since when this is a smarty channel? :-) |
# |
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/ |