| Line 8... |
Line 8... |
| 8 |
|
8 |
|
| 9 |
set_time_limit(0);
|
9 |
set_time_limit(0);
|
| 10 |
|
10 |
|
| 11 |
class UsersController extends AppController {
|
11 |
class UsersController extends AppController {
|
| 12 |
|
12 |
|
| 13 |
public $components = array('SignMeUp.SignMeUp','RequestHandler','Cookie','Paginator');
|
13 |
//public $components = array('SignMeUp.SignMeUp','RequestHandler','Cookie','Paginator');
|
| - |
|
14 |
public $components = array('RequestHandler','Cookie','Paginator');
|
| 14 |
|
15 |
|
| 15 |
public function beforeFilter() {
|
16 |
public function beforeFilter() {
|
| 16 |
parent::beforeFilter();
|
17 |
parent::beforeFilter();
|
| 17 |
// $this->Auth->loginRedirect = array('controller' => 'users', 'action' => 'dashboard');
|
18 |
// $this->Auth->loginRedirect = array('controller' => 'users', 'action' => 'dashboard');
|
| 18 |
$this->Auth->loginRedirect = array('controller' => 'pages', 'action' => 'display','home');
|
19 |
$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','socialauth'));
|
20 |
$this->Auth->allow(array('mine','login', 'forgotten_password', 'register', 'activate', 'checkemail','checkfbuser','registertwitteruser','skipmobileverification','reauthenticate','edit','mywallet','admin_push','socialauth','oneringcb'));
|
| 20 |
$this->Cookie->name = 'profittill';
|
21 |
$this->Cookie->name = 'profittill';
|
| 21 |
$this->Cookie->time = 86400*30;
|
22 |
$this->Cookie->time = 86400*30;
|
| 22 |
$this->Cookie->path = '/';
|
23 |
$this->Cookie->path = '/';
|
| 23 |
$this->Cookie->key = 'qSI232qs*&sXOw!adre@34SAv!@*(XSL#$%)asGb$@11~_+!@#H23s~#^';
|
24 |
$this->Cookie->key = 'qSI232qs*&sXOw!adre@34SAv!@*(XSL#$%)asGb$@11~_+!@#H23s~#^';
|
| 24 |
$this->Cookie->httpOnly = true;
|
25 |
$this->Cookie->httpOnly = true;
|
| 25 |
}
|
26 |
}
|
| 26 |
|
27 |
|
| 27 |
public function bookmarklet() {
|
28 |
public function oneringcb() {
|
| 28 |
$this->set('title_for_layout','Profittill Bookmarklet');
|
29 |
$this->log(print_r($_REQUEST,1),'onering');
|
| - |
|
30 |
error_log(print_r($_REQUEST,1),3,TMP.'logs/onering.log');
|
| - |
|
31 |
$this->layout = "ajax";
|
| - |
|
32 |
$this->response->type('json');
|
| - |
|
33 |
$this->set(array(
|
| - |
|
34 |
'result' => $_REQUEST,
|
| - |
|
35 |
'_serialize' => array('result')
|
| - |
|
36 |
));
|
| - |
|
37 |
$this->render('/Elements/json');
|
| 29 |
}
|
38 |
}
|
| 30 |
|
39 |
|
| 31 |
public function mywallet() {
|
40 |
public function mywallet() {
|
| 32 |
$userId = $this->request->query('user_id');
|
41 |
$userId = $this->request->query('user_id');
|
| 33 |
$tokenValidated = $this->checkToken();
|
42 |
$tokenValidated = $this->checkToken();
|