Subversion Repositories SmartDukaan

Rev

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

Rev 14824 Rev 14825
Line 14... Line 14...
14
 
14
 
15
    public function beforeFilter() {
15
    public function beforeFilter() {
16
    	parent::beforeFilter();
16
    	parent::beforeFilter();
17
    	// $this->Auth->loginRedirect = array('controller' => 'users', 'action' => 'dashboard');
17
    	// $this->Auth->loginRedirect = array('controller' => 'users', 'action' => 'dashboard');
18
    	$this->Auth->loginRedirect = array('controller' => 'pages', 'action' => 'display','home');
18
    	$this->Auth->loginRedirect = array('controller' => 'pages', 'action' => 'display','home');
19
        $this->Auth->allow(array('mine','login', 'forgotten_password', 'register', 'activate', 'checkemail','checkfbuser','registertwitteruser','skipmobileverification','reauthenticate','edit','mywallet','admin_push')); 
19
        $this->Auth->allow(array('mine','login', 'forgotten_password', 'register', 'activate', 'checkemail','checkfbuser','registertwitteruser','skipmobileverification','reauthenticate','edit','mywallet','admin_push','socialauth')); 
20
		$this->Cookie->name = 'profittill';
20
		$this->Cookie->name = 'profittill';
21
		$this->Cookie->time = 86400*30; 
21
		$this->Cookie->time = 86400*30; 
22
		$this->Cookie->path = '/';
22
		$this->Cookie->path = '/';
23
		$this->Cookie->key = 'qSI232qs*&sXOw!adre@34SAv!@*(XSL#$%)asGb$@11~_+!@#H23s~#^';
23
		$this->Cookie->key = 'qSI232qs*&sXOw!adre@34SAv!@*(XSL#$%)asGb$@11~_+!@#H23s~#^';
24
		$this->Cookie->httpOnly = true;
24
		$this->Cookie->httpOnly = true;
Line 36... Line 36...
36
			header('location:'.$redirectUrl);
36
			header('location:'.$redirectUrl);
37
			exit();
37
			exit();
38
		}
38
		}
39
	}
39
	}
40
 
40
 
-
 
41
	public function socialauth() {
-
 
42
		$this->layout = "ajax";
-
 
43
		$this->log(print_r($this->request->data,1),'socialauth');
-
 
44
	}
-
 
45
 
41
	public function mine() {
46
	public function mine() {
42
		$this->response->type('json');
47
		$this->response->type('json');
43
		$this->layout = 'ajax';
48
		$this->layout = 'ajax';
44
		$userId = $this->request->query('user_id');
49
		$userId = $this->request->query('user_id');
45
		if(isset($userId) && !empty($userId)){
50
		if(isset($userId) && !empty($userId)){