Re: Unknown Bug

2014-12-08 Thread mark_story
It totally sounds like a mod_rewrite issue. You mentioned that cake 'hated' being in rewriteless mode. What exactly happened? -Mark On Wednesday, 3 December 2014 14:14:41 UTC-5, florida...@gmail.com wrote: > > Unknown bug in either setup or programming (not limited to Cake) > > The combination:

CakePHP 2.5.7 released

2014-12-08 Thread mark_story
The CakePHP core team is proud to announce the immediate availability of CakePHP 2.5.7. 2.5.7 is a bugfix release for the 2.5 release branch. A short list of the changes you can expect is: * Unsetting the email address pattern in CakeEmail now works as documented. * Console tools now exit non-ze

Re: In CakePHP 3, how do I check if user is logged in and has admin rights?

2014-12-08 Thread frocco
Thank you On Monday, December 8, 2014 4:51:56 PM UTC-5, euromark wrote: > > Yes, you can simply use Auth->allow(listofactionnames) as documented to > make the non admin actions public. > either in each controller, or globally in your app controller > > > Am Montag, 8. Dezember 2014 19:28:17 UTC+1

Re: Cakephp 3 - save extra data on association table

2014-12-08 Thread José Lorenzo
Check the documentation here http://book.cakephp.org/3.0/en/orm/table-objects.html#saving-additional-data-to-the-joint-table On Monday, December 8, 2014 12:24:46 PM UTC+1, grb wrote: > > Trying to set up an example on how to use join table with extra data I > have the following set: > >- t

Re: In CakePHP 3, how do I check if user is logged in and has admin rights?

2014-12-08 Thread euromark
Yes, you can simply use Auth->allow(listofactionnames) as documented to make the non admin actions public. either in each controller, or globally in your app controller Am Montag, 8. Dezember 2014 19:28:17 UTC+1 schrieb frocco: > > I have another question. > > I used bake with the prefix admin a

Cakephp 3 - save extra data on association table

2014-12-08 Thread grb
Trying to set up an example on how to use join table with extra data I have the following set: - table students: id, name, [...] - table courses: id, title, [...] - join table courses_students: id, course_id, student_id, grade, hours_attended I want to save a student record toge

Re: In CakePHP 3, how do I check if user is logged in and has admin rights?

2014-12-08 Thread frocco
I have another question. I used bake with the prefix admin and now need to protect each controller to allow admin only. Is this done in the beforeFilter? What is the correct syntax? Thanks -- Like Us on FaceBook https://www.facebook.com/CakePHP Find us on Twitter http://twitter.com/CakePHP

Re: In CakePHP 3, how do I check if user is logged in and has admin rights?

2014-12-08 Thread frocco
Thank you for your help. This seems to be working. if($this->Session->check('Auth.User.role') == 'admin') On Monday, December 8, 2014 9:09:15 AM UTC-5, euromark wrote: > > Same thing. Just use this wrapper. > And use debug kit to see how the session data looks like. > But you should be able to us

Re: In CakePHP 3, how do I check if user is logged in and has admin rights?

2014-12-08 Thread euromark
Same thing. Just use this wrapper. And use debug kit to see how the session data looks like. But you should be able to use the knowledge you gained in my previous answer to translate it to the role question. The answer is right in front of you. mark Am Montag, 8. Dezember 2014 12:13:53 UTC+1 sc

Re: In CakePHP 3, how do I check if user is logged in and has admin rights?

2014-12-08 Thread frocco
Thank you, What is the syntax to check if they have a role called admin? Field name is role. On Monday, December 8, 2014 5:29:35 AM UTC-5, euromark wrote: > > if ($this->Session>check('Auth.User.id') {} > > > Am Montag, 8. Dezember 2014 02:32:28 UTC+1 schrieb frocco: >> >> I want to check in my

Re: compare time arrays

2014-12-08 Thread euromark
convert them both to int before comparing should work. or better yet, use DateTime class and its built in comparison methods. mark Am Samstag, 6. Dezember 2014 15:03:16 UTC+1 schrieb ajt: > > Hi, > How do you compare time arrays in cakephp? > I tried to convert the time to a string without succes

Re: In CakePHP 3, how do I check if user is logged in and has admin rights?

2014-12-08 Thread euromark
if ($this->Session>check('Auth.User.id') {} Am Montag, 8. Dezember 2014 02:32:28 UTC+1 schrieb frocco: > > I want to check in my default layout. > > Thanks > -- Like Us on FaceBook https://www.facebook.com/CakePHP Find us on Twitter http://twitter.com/CakePHP --- You received this message bec

Re: CakePHP 2.4 Auth->login() always return TRUE ... ?

2014-12-08 Thread Yomi Ojo
On Wednesday, April 16, 2014 5:59:47 PM UTC+1, euromark wrote: > > You are like the 400th person who didnt read that part of the > documentation in 2.x > > http://book.cakephp.org/2.0/en/core-libraries/components/authentication.html#identifying-users-and-logging-them-in > (red warning box) > > i