| Line 19... |
Line 19... |
| 19 |
parent::beforeFilter();
|
19 |
parent::beforeFilter();
|
| 20 |
$this->Auth->allow('update','by','rem');
|
20 |
$this->Auth->allow('update','by','rem');
|
| 21 |
}
|
21 |
}
|
| 22 |
|
22 |
|
| 23 |
public function mine() {
|
23 |
public function mine() {
|
| - |
|
24 |
$userId = $this->request->query('user_id');
|
| - |
|
25 |
if(isset($userId) && !empty($userId)){
|
| - |
|
26 |
$this->loadModel('User');
|
| - |
|
27 |
$dbuser = $this->User->findById($userId);
|
| - |
|
28 |
$this->Auth->login($dbuser['User']);
|
| - |
|
29 |
}
|
| 24 |
$this->layout = "innerpages";
|
30 |
$this->layout = "innerpages";
|
| 25 |
$this->UserAction->Behaviors->attach('Containable');
|
31 |
$this->UserAction->Behaviors->attach('Containable');
|
| 26 |
$contain = array('StoreProduct.title','StoreProduct.thumbnail','StoreProduct.mrp','StoreProduct.available_price');
|
32 |
$contain = array('StoreProduct.title','StoreProduct.thumbnail','StoreProduct.mrp','StoreProduct.available_price');
|
| 27 |
$options = array('contain'=>$contain,'conditions'=>array('UserAction.user_id'=>$this->Auth->User('id'),'UserAction.action'=>'like'));
|
33 |
$options = array('contain'=>$contain,'conditions'=>array('UserAction.user_id'=>$this->Auth->User('id'),'UserAction.action'=>'like'));
|
| 28 |
$myfavorites = $this->UserAction->find('all',$options);
|
34 |
$myfavorites = $this->UserAction->find('all',$options);
|