/media/shnoulle/data/webdev/master/application/models/User.php(136)
124 125 // created as datetime default current date in create scenario ? 126 // modifier as datetime default current date ? 127 array('validation_key', 'length','max' => self::MAX_VALIDATION_KEY_LENGTH), 128 //todo: write a rule for date (can also be null) 129 //array('lastForgotPwEmail', 'numerical', 'integerOnly' => true, 'allowEmpty' => true), 130 ); 131 } 132 133 /** @inheritdoc */ 134 public function scopes() 135 { 136 $userStatusType = \Yii::app()->db->schema->getTable('{{users}}')->columns['user_status']->dbType; 137 $activeScope = array( 138 'condition' => 'user_status = :active', 139 'params' => array( 140 'active' => $userStatusType == 'boolean' ? 'TRUE' : '1', 141 ) 142 ); 143 144 $notExpiredScope = array( 145 'condition' => "expires > :now OR expires IS NULL", 146 'params' => array( 147 'now' => dateShift(date("Y-m-d H:i:s"), "Y-m-d H:i:s", Yii::app()->getConfig("timeadjust")), 148 )
| #0 |
+
–
/media/shnoulle/data/webdev/master/vendor/yiisoft/yii/framework/db/ar/CActiveRecord.php(222): User->scopes() 217 return $this->getRelated($name,false); 218 else 219 return $this->getRelated($name,false,$parameters[0]); 220 } 221 222 $scopes=$this->scopes(); 223 if(isset($scopes[$name])) 224 { 225 $this->getDbCriteria()->mergeWith($scopes[$name]); 226 return $this; 227 } |
| #1 |
+
–
/media/shnoulle/data/webdev/master/application/core/Traits/LSApplicationTrait.php(33): CActiveRecord->__call("notexpired", array()) 28 if (!is_null($this->currentUserId) && $this->currentUserId == App()->session['loginID']) { 29 return $this->currentUserId; 30 } 31 /* use App()->session and not App()->user fot easiest unit test */ 32 $this->currentUserId = App()->session['loginID']; 33 if ($this->currentUserId && !User::model()->notexpired()->active()->findByPk($this->currentUserId)) { 34 $this->currentUserId = 0; 35 } 36 return $this->currentUserId; 37 } 38 |
| #2 |
+
–
/media/shnoulle/data/webdev/master/application/core/LSWebUser.php(25): LSYii_Application->getCurrentUserId() 20 public function getId() 21 { 22 if (empty(parent::getId())) { 23 return parent::getId(); 24 } 25 $id = App()->getCurrentUserId(); 26 if ($id === 0) { 27 /* User is still connected but invalid : logout */ 28 $this->logout(); 29 } 30 return $id; |
| #3 |
+
–
/media/shnoulle/data/webdev/master/application/controllers/AdminController.php(39): LSWebUser->getId() 34 { 35 parent::customInit(); 36 App()->getComponent('bootstrap'); 37 $this->sessioncontrol(); 38 39 $this->user_id = Yii::app()->user->getId(); 40 // Check if the user really exists 41 // This scenario happens if the user was deleted while still being logged in 42 if (!empty($this->user_id) && User::model()->findByPk($this->user_id) == null) { 43 $this->user_id = null; 44 Yii::app()->session->destroy(); |
| #4 |
+
–
/media/shnoulle/data/webdev/master/application/core/LSYii_Controller.php(45): AdminController->customInit() 40 $this->loadHelper('globalsettings'); 41 // tracevar function 42 //$this->loadHelper('common'); 43 $this->loadHelper('expressions.em_manager'); 44 $this->loadHelper('replacements'); 45 $this->customInit(); 46 } 47 48 /** 49 * Check that installation was already done by looking for config.php 50 * Will redirect to the installer script if not exists. |
| #5 |
+
–
/media/shnoulle/data/webdev/master/vendor/yiisoft/yii/framework/web/CWebApplication.php(359): LSYii_Controller->__construct("admin", null) 354 require($classFile); 355 if(class_exists($className,false) && is_subclass_of($className,'CController')) 356 { 357 $id[0]=strtolower($id[0]); 358 return array( 359 new $className($controllerID.$id,$owner===$this?null:$owner), 360 $this->parseActionParams($route), 361 ); 362 } 363 return null; 364 } |
| #6 |
+
–
/media/shnoulle/data/webdev/master/application/core/LSYii_Application.php(519): CWebApplication->createController("databaseupdate/sa/db/", LSYii_Application) 514 * @inheritdoc 515 * Special handling for SEO friendly URLs 516 */ 517 public function createController($route, $owner=null) 518 { 519 $controller = parent::createController($route, $owner); 520 521 // If no controller is found by standard ways, check if the route matches 522 // an existing survey's alias. 523 if (is_null($controller)) { 524 $controller = $this->createControllerFromShortUrl($route); |
| #7 |
+
–
/media/shnoulle/data/webdev/master/vendor/yiisoft/yii/framework/web/CWebApplication.php(276): LSYii_Application->createController("admin/databaseupdate/sa/db") 271 * @param string $route the route of the current request. See {@link createController} for more details. 272 * @throws CHttpException if the controller could not be created. 273 */ 274 public function runController($route) 275 { 276 if(($ca=$this->createController($route))!==null) 277 { 278 list($controller,$actionID)=$ca; 279 $oldController=$this->_controller; 280 $this->_controller=$controller; 281 $controller->init(); |
| #8 |
+
–
/media/shnoulle/data/webdev/master/vendor/yiisoft/yii/framework/web/CWebApplication.php(141): CWebApplication->runController("admin/databaseupdate/sa/db") 136 foreach(array_splice($this->catchAllRequest,1) as $name=>$value) 137 $_GET[$name]=$value; 138 } 139 else 140 $route=$this->getUrlManager()->parseUrl($this->getRequest()); 141 $this->runController($route); 142 } 143 144 /** 145 * Registers the core application components. 146 * This method overrides the parent implementation by registering additional core components. |
| #9 |
+
–
/media/shnoulle/data/webdev/master/vendor/yiisoft/yii/framework/base/CApplication.php(185): CWebApplication->processRequest() 180 public function run() 181 { 182 if($this->hasEventHandler('onBeginRequest')) 183 $this->onBeginRequest(new CEvent($this)); 184 register_shutdown_function(array($this,'end'),0,false); 185 $this->processRequest(); 186 if($this->hasEventHandler('onEndRequest')) 187 $this->onEndRequest(new CEvent($this)); 188 } 189 190 /** |
| #10 |
+
–
/media/shnoulle/data/webdev/master/index.php(161): CApplication->run() 156 require_once APPPATH . 'core/LSYii_Application' . EXT; 157 158 $config = require_once(APPPATH . 'config/internal' . EXT); 159 160 Yii::$enableIncludePath = false; 161 Yii::createApplication('LSYii_Application', $config)->run(); 162 163 /* End of file index.php */ 164 /* Location: ./index.php */ |