/** * @Author: ANH DUNG May 20, 2014 * @Todo: check user login valid * @Param: $mUser */ public function checkExpired($mUser) { $today = date('Y-m-d'); return MyFormat::compareTwoDate($today, $mUser->expiration_date); // ANH DUNG CLOSE MAY 20, 2014 // if ($expired_date == '0000-00-00' || $expired_date == '0000-00-00 00:00:00' || is_null($expired_date)){ // return false; // } // else{ // $currentDate = strtotime(date('Y-m-d')); // $expired = strtotime($expired_date); // // if($currentDate > $expired) // return true; // } // return false; }
return $mUser; } /** * @Author: ANH DUNG Apr 28, 2014 * @Todo: copy info update from form model ProTransactionsVendorPurchaserDetail to user * @Param: $model is model ProTransactionsVendorPurchaserDetail * @Return: model user */ public static function updateUserVendorPurchaser($model) { $mUser = Users::model()->findByPk($model->user_id); if (is_null($mUser) || $model->is_new_user == 0) { return; } $mUser->scenario = null;