Subversion Repositories SmartDukaan

Rev

Rev 13685 | Rev 14891 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
13674 anikendra 1
<?php
2
App::uses('AppController', 'Controller');
3
/**
4
 * Stores Controller
5
 *
6
 * @property Store $Store
7
 * @property PaginatorComponent $Paginator
8
 */
9
class AboutsController extends AppController {
10
 
11
/**
12
 * Components
13
 *
14
 * @var array
15
 */
16
	public $components = array('Paginator');
17
 
18
	public function beforeFilter() {		
19
		parent::beforeFilter();
13699 anikendra 20
		$this->Auth->allow('howitworks','pending');
13674 anikendra 21
		$this->layout = 'static';
22
	}
23
/**
24
 * index method
25
 *
26
 * @return void
27
 */
13699 anikendra 28
 
29
	public function pending(){
30
 
31
	}
32
 
13674 anikendra 33
	public function index() {
13685 anikendra 34
		$userId = $this->request->query('user_id');
35
		if(isset($userId) && !empty($userId)){
36
			$this->loadModel('User');
37
			$dbuser = $this->User->findById($userId);
38
			$this->Auth->login($dbuser['User']);	
39
		}
13674 anikendra 40
	}
13682 anikendra 41
 
42
	public function howitworks() {
43
		$userId = $this->request->query('user_id');
44
		if(isset($userId) && !empty($userId)){
45
			$this->loadModel('User');
46
			$dbuser = $this->User->findById($userId);
47
			$this->Auth->login($dbuser['User']);	
48
		}
49
	}
13674 anikendra 50
}