Warning: strtotime(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected the timezone 'UTC' for now, but please set date.timezone to select your timezone. in /home/solutio2/public_html/lordkrishna/lib/Cake/Cache/CacheEngine.php on line 60

Warning: strtotime(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected the timezone 'UTC' for now, but please set date.timezone to select your timezone. in /home/solutio2/public_html/lordkrishna/lib/Cake/Cache/CacheEngine.php on line 60
CakePHP: the rapid development php framework: Users
App::uses('AuthComponent', 'Controller/Component'); class User extends AppModel { public $validate = array( 'username' => array( 'required' => array( 'rule' => array('notEmpty'), 'message' => 'A username is required' ) ), 'password' => array( 'required' => array( 'rule' => array('notEmpty'), 'message' => 'A password is required' ) ), 'role' => array( 'valid' => array( 'rule' => array('inList', array('admin', 'author')), 'message' => 'Please enter a valid role', 'allowEmpty' => false ) ) ); public $belongsTo = array('Group'); public $actsAs = array('Acl' => array('type' => 'requester')); public function parentNode() { if (!$this->id && empty($this->data)) { return null; } if (isset($this->data['User']['group_id'])) { $groupId = $this->data['User']['group_id']; } else { $groupId = $this->field('group_id'); } if (!$groupId) { return null; } else { return array('Group' => array('id' => $groupId)); } } public function beforeSave($options = array()) { if (isset($this->data[$this->alias]['password'])) { $this->data[$this->alias]['password'] = AuthComponent::password($this->data[$this->alias]['password']); } return true; } public function bindNode($user) { return array('model' => 'Group', 'foreign_key' => $user['User']['group_id']); } } App::uses('AuthComponent', 'Controller/Component'); class User extends AppModel { public $validate = array( 'username' => array( 'required' => array( 'rule' => array('notEmpty'), 'message' => 'A username is required' ) ), 'password' => array( 'required' => array( 'rule' => array('notEmpty'), 'message' => 'A password is required' ) ), 'role' => array( 'valid' => array( 'rule' => array('inList', array('admin', 'author')), 'message' => 'Please enter a valid role', 'allowEmpty' => false ) ) ); public $belongsTo = array('Group'); public $actsAs = array('Acl' => array('type' => 'requester')); public function parentNode() { if (!$this->id && empty($this->data)) { return null; } if (isset($this->data['User']['group_id'])) { $groupId = $this->data['User']['group_id']; } else { $groupId = $this->field('group_id'); } if (!$groupId) { return null; } else { return array('Group' => array('id' => $groupId)); } } public function beforeSave($options = array()) { if (isset($this->data[$this->alias]['password'])) { $this->data[$this->alias]['password'] = AuthComponent::password($this->data[$this->alias]['password']); } return true; } public function bindNode($user) { return array('model' => 'Group', 'foreign_key' => $user['User']['group_id']); } }
Please enter your username and password
(default) 0 query took ms
NrQueryErrorAffectedNum. rowsTook (ms)