Subversion Repositories SmartDukaan

Rev

Rev 16423 | Rev 18359 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 16423 Rev 18357
Line 61... Line 61...
61
			}
61
			}
62
		}
62
		}
63
	}
63
	}
64
 
64
 
65
	public function filter($str,$catId=3) {
65
	public function filter($str,$catId=3) {
-
 
66
		setcookie("brandschosen", urldecode($str), time()+6*3600, '/');
66
		$userId = $this->request->query('user_id');
67
		$userId = $this->request->query('user_id');
67
		if(isset($userId) && !empty($userId)) {
68
		if(isset($userId) && !empty($userId)) {
68
			$this->loadModel('User');
69
			$this->loadModel('User');
69
			$dbuser = $this->User->findById($userId);
70
			$dbuser = $this->User->findById($userId);
70
			$this->Auth->login($dbuser['User']);
71
			$this->Auth->login($dbuser['User']);
71
		}
72
		}
72
		setcookie("brandschosen", urldecode($str), time()+6*3600, '/');
-
 
73
		$this->redirect('/category/'.$catId);
73
		$this->redirect('/category/'.$catId);
74
	}	
74
	}	
75
 
75
 
76
/**
76
/**
77
 * edit method
77
 * edit method