Permalink
Browse files

Auth

  • Loading branch information...
bartcc committed Aug 16, 2011
1 parent 1b1bf13 commit 5e043673a66633d736634ecf414385159ae91962
Showing 490 changed files with 1,596 additions and 125,467 deletions.
View
@@ -1,4 +1,5 @@
<?php
+
/**
* Application level Controller
*
@@ -31,8 +32,19 @@
* @subpackage cake.app
*/
class AppController extends Controller {
-
- function beforeFilter() {
- $this->autoRender = FALSE;
- }
+
+ var $helpers = array('Session', 'Html', 'Js');
+ var $components = array('RequestHandler', 'Session', 'Auth', 'Cookie');
+
+ function beforeFilter() {
+ $this->autoRender = FALSE;
+ $this->Auth->autoRedirect = FALSE;
+
+ }
+
+ function beforeRender() {
+ if ($this->RequestHandler->isAjax())
+ $this->layout = 'ajax';
+ }
+
}
View
@@ -32,17 +32,4 @@
*/
class AppModel extends Model {
- function afterFind($results) {
-
- foreach ($results as $key => $val) {
- if(isset($val[$this->alias]['done'])) {
- $val[$this->alias]['done'] = (BOOLEAN) $val[$this->alias]['done'];
- }
- $results[$key] = $val[$this->alias];
- }
-
- return $results;
- }
-
-
}
@@ -684,7 +684,6 @@ function login($data = null) {
if (empty($data)) {
$data = $this->data;
}
-
if ($user = $this->identify($data)) {
$this->Session->write($this->sessionKey, $user);
$this->_loggedIn = true;
Oops, something went wrong.

0 comments on commit 5e04367

Please sign in to comment.