| Line 5... |
Line 5... |
| 5 |
*
|
5 |
*
|
| 6 |
* @property User $User
|
6 |
* @property User $User
|
| 7 |
*/
|
7 |
*/
|
| 8 |
class UsersController extends AppController {
|
8 |
class UsersController extends AppController {
|
| 9 |
|
9 |
|
| 10 |
public $components = array('SignMeUp.SignMeUp','RequestHandler','Cookie');
|
10 |
public $components = array('SignMeUp.SignMeUp','RequestHandler','Cookie','Paginator');
|
| 11 |
|
11 |
|
| 12 |
public function beforeFilter() {
|
12 |
public function beforeFilter() {
|
| 13 |
parent::beforeFilter();
|
13 |
parent::beforeFilter();
|
| 14 |
// $this->Auth->loginRedirect = array('controller' => 'users', 'action' => 'dashboard');
|
14 |
// $this->Auth->loginRedirect = array('controller' => 'users', 'action' => 'dashboard');
|
| 15 |
$this->Auth->loginRedirect = array('controller' => 'pages', 'action' => 'display','home');
|
15 |
$this->Auth->loginRedirect = array('controller' => 'pages', 'action' => 'display','home');
|
| 16 |
$this->Auth->allow(array('mine','login', 'forgotten_password', 'register', 'activate', 'checkemail','checkfbuser','registertwitteruser','skipmobileverification','reauthenticate','edit','mywallet','admin_users'));
|
16 |
$this->Auth->allow(array('mine','login', 'forgotten_password', 'register', 'activate', 'checkemail','checkfbuser','registertwitteruser','skipmobileverification','reauthenticate','edit','mywallet','admin_index'));
|
| 17 |
$this->Cookie->name = 'profittill';
|
17 |
$this->Cookie->name = 'profittill';
|
| 18 |
$this->Cookie->time = 86400*30;
|
18 |
$this->Cookie->time = 86400*30;
|
| 19 |
$this->Cookie->path = '/';
|
19 |
$this->Cookie->path = '/';
|
| 20 |
$this->Cookie->key = 'qSI232qs*&sXOw!adre@34SAv!@*(XSL#$%)asGb$@11~_+!@#H23s~#^';
|
20 |
$this->Cookie->key = 'qSI232qs*&sXOw!adre@34SAv!@*(XSL#$%)asGb$@11~_+!@#H23s~#^';
|
| 21 |
$this->Cookie->httpOnly = true;
|
21 |
$this->Cookie->httpOnly = true;
|
| Line 291... |
Line 291... |
| 291 |
*
|
291 |
*
|
| 292 |
* @return void
|
292 |
* @return void
|
| 293 |
*/
|
293 |
*/
|
| 294 |
public function admin_index() {
|
294 |
public function admin_index() {
|
| 295 |
$this->User->recursive = 0;
|
295 |
$this->User->recursive = 0;
|
| - |
|
296 |
$options = array('limit'=>100,'order'=>array('id'=>'desc'));
|
| - |
|
297 |
$this->Paginator->settings = $options;
|
| 296 |
$users = $this->paginate();
|
298 |
$users = $this->Paginator->paginate();
|
| 297 |
$groups = $this->User->Group->find('list');
|
299 |
$groups = $this->User->Group->find('list');
|
| 298 |
$this->set(compact('groups','users'));
|
300 |
$this->set(compact('groups','users'));
|
| 299 |
}
|
301 |
}
|
| 300 |
|
302 |
|
| 301 |
/**
|
303 |
/**
|