Re: hasMany with group by

2013-12-15 Thread Andrew Ponomarev
Hi, did you resolve the problem? How did you do that? I have the similar 
problem. 

вторник, 12 марта 2013 г., 23:33:46 UTC+4 пользователь André Luis написал:
>
> Hi people, I have model User and model Image, and the model User hasMany 
> Image, so when i use $this->User->find('all'), it comes with the respective 
> related images, but in the table of model Image, I also have the field 
> "category", wich is a string... My doubt is, is there anyway to group the 
> results of the related model "Image" by the field "category" at the related 
> model "Image" ??
>
> Thanks!!
>

-- 
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP

--- 
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to cake-php+unsubscr...@googlegroups.com.
To post to this group, send email to cake-php@googlegroups.com.
Visit this group at http://groups.google.com/group/cake-php.
For more options, visit https://groups.google.com/groups/opt_out.


Re: Cakephp Manual Auth login returns true, but not logged in another page

2013-12-10 Thread Andrew Ponomarev
I found out that $this->Session->Auth array exists and contains correct 
user data, but debug(AuthComponent::user('id')) returns NULL. Why? 

пятница, 21 июня 2013 г., 2:37:44 UTC+4 пользователь Rahul Reddy написал:
>
> In my cakephp(v 2.3.4) app, I am using the code below to manually login 
> users after they register, as provided in the 
> manual
> .
>
> if ($this->User->save($this->request->data)) {
> $id = $this->User->id;
> $this->request->data['User'] = 
> array_merge($this->request->data['User'], array('id' => $id));
> if($this->Auth->login($this->request->data['User'])) {
>   $this->redirect('/homepage');
> }
> }
>
> I am getting the $this->Auth->login($this->request->data['User']) response 
> as true and it is getting redirected to the home page. But the user is not 
> logged in homepage (or in any other page). Please help me in fixing this. 
> Thanks in advance.
>

-- 
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP

--- 
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to cake-php+unsubscr...@googlegroups.com.
To post to this group, send email to cake-php@googlegroups.com.
Visit this group at http://groups.google.com/group/cake-php.
For more options, visit https://groups.google.com/groups/opt_out.