| Line 70... |
Line 70... |
| 70 |
$userId = $this->request->query('user_id');
|
70 |
$userId = $this->request->query('user_id');
|
| 71 |
$firsttime = $this->request->query('firsttime');
|
71 |
$firsttime = $this->request->query('firsttime');
|
| 72 |
if(isset($firsttime) && !empty($firsttime)){
|
72 |
if(isset($firsttime) && !empty($firsttime)){
|
| 73 |
$this->set('firsttime',1);
|
73 |
$this->set('firsttime',1);
|
| 74 |
}
|
74 |
}
|
| 75 |
if(isset($userId) && !empty($userId)){
|
75 |
// if(isset($userId) && !empty($userId)){
|
| 76 |
$dbuser = $this->User->findById($userId);
|
76 |
// $dbuser = $this->User->findById($userId);
|
| 77 |
$this->Auth->login($dbuser['User']);
|
77 |
// $this->Auth->login($dbuser['User']);
|
| 78 |
}
|
78 |
// }
|
| 79 |
//Get all categories
|
79 |
//Get all categories
|
| 80 |
$this->Category->Behaviors->attach('Containable');
|
80 |
$this->Category->Behaviors->attach('Containable');
|
| 81 |
$options = array('conditions'=>array('parent_id !='=>0),'contain'=>(array('Brand.name','Brand.displayed_in_preference_page')));
|
81 |
$options = array('conditions'=>array('parent_id !='=>0),'contain'=>(array('Brand.name','Brand.displayed_in_preference_page')));
|
| 82 |
$categories = $this->Category->find('all',$options);
|
82 |
$categories = $this->Category->find('all',$options);
|
| 83 |
$this->User->Behaviors->attach('Containable');
|
83 |
$this->User->Behaviors->attach('Containable');
|