Subversion Repositories SmartDukaan

Rev

Rev 13682 | Rev 13699 | 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();
20
		$this->Auth->allow('howitworks');
21
		$this->layout = 'static';
22
	}
23
/**
24
 * index method
25
 *
26
 * @return void
27
 */
28
	public function index() {
13685 anikendra 29
		$userId = $this->request->query('user_id');
30
		if(isset($userId) && !empty($userId)){
31
			$this->loadModel('User');
32
			$dbuser = $this->User->findById($userId);
33
			$this->Auth->login($dbuser['User']);	
34
		}
13674 anikendra 35
	}
13682 anikendra 36
 
37
	public function howitworks() {
38
		$userId = $this->request->query('user_id');
39
		if(isset($userId) && !empty($userId)){
40
			$this->loadModel('User');
41
			$dbuser = $this->User->findById($userId);
42
			$this->Auth->login($dbuser['User']);	
43
		}
44
	}
13674 anikendra 45
}