当前位置: 首页>>代码示例>>PHP>>正文


PHP Users::unsetAttributes方法代码示例

本文整理汇总了PHP中Users::unsetAttributes方法的典型用法代码示例。如果您正苦于以下问题:PHP Users::unsetAttributes方法的具体用法?PHP Users::unsetAttributes怎么用?PHP Users::unsetAttributes使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Users的用法示例。


在下文中一共展示了Users::unsetAttributes方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: actionAdmin

 public function actionAdmin()
 {
     $model = new Users('search');
     $model->unsetAttributes();
     if (isset($_GET['Users'])) {
         $model->setAttributes($_GET['Users']);
     }
     $this->render('admin', array('model' => $model));
 }
开发者ID:nov072008,项目名称:yiitesting,代码行数:9,代码来源:UsersController.php

示例2: actionDefault

 public function actionDefault()
 {
     $model = new Users('search');
     $model->unsetAttributes();
     // clear any default values
     if (isset($_GET['Users'])) {
         $model->attributes = $_GET['Users'];
     }
     $this->render('admin', array('model' => $model));
 }
开发者ID:parxtan,项目名称:gdeskidki,代码行数:10,代码来源:UsersController.php

示例3: actionIndex

 public function actionIndex()
 {
     $model = new Users("search");
     $model->unsetAttributes();
     if (isset($_GET['Users'])) {
         $model->attributes = $_GET['Users'];
     }
     $data = $model->search();
     $this->render("index", ["dataProvider" => $data, "model" => $model]);
 }
开发者ID:CrystReal,项目名称:Site_backend,代码行数:10,代码来源:UsersController.php

示例4: actionIndex

 public function actionIndex()
 {
     $model = new Users('search');
     $model->unsetAttributes();
     if (isset($_GET['Users'])) {
         $model->setAttributes($_GET['Users']);
     }
     $dataProvider = $model->search();
     $this->render('//users/index', array('dataProvider' => $dataProvider, 'model' => $model));
 }
开发者ID:mmorpg2015,项目名称:ghtweb5,代码行数:10,代码来源:UsersController.php

示例5: actionIndex

 public function actionIndex()
 {
     $this->layout = '//layouts/admin';
     $this->pageTitle = 'Пользователи';
     $this->breadcrumbs = array('Пользователи');
     $model = new Users('search');
     $model->unsetAttributes();
     if (isset($_GET['Users'])) {
         $model->attributes = $_GET['Users'];
     }
     $this->render('index', array('model' => $model));
 }
开发者ID:42point,项目名称:Vinum,代码行数:12,代码来源:DefaultController.php

示例6: actionIndex

	public function actionIndex()
	{
		$users = new Users('search');
		$users->unsetAttributes();

		$solicitors = new Solicitor('search');
		$solicitors->unsetAttributes();

		$donations = new Donation('search');
		$donations->unsetAttributes();

		$payments = new SolicitorCredit('search');
		$payments->unsetAttributes();

		$user = Users::model()->count();
		$solicitor = Solicitor::model()->count();

		$donation = BaseModel::getAll("Donation");
		$t_donation = 0;
		foreach($donation as $d){
			$t_donation = $t_donation + $d->amount;
		}

		$debit = BaseModel::getAll("SolicitorCredit");
		$t_debit = 0;
		foreach ($debit as $d) {
			$t_debit = $t_debit + $d->amount;
		}

		$this->render('index',array(
									'users'=>$users,
									'solicitors'=>$solicitors,
									'donations'=>$donations,
									'payments'=>$payments,
									'user' => $user,
									'solicitor' => $solicitor,
									't_donation' => $t_donation,
									't_debit' => $t_debit
									));
	}
开发者ID:priyranjansingh,项目名称:donation,代码行数:40,代码来源:DashboardController.php

示例7: actionIndex

 /**
  * Lists all models.
  */
 public function actionIndex()
 {
     $session = new CHttpSession();
     $session->open();
     $criteria = new CDbCriteria();
     $model = new Users('search');
     $model->unsetAttributes();
     // clear any default values
     if (isset($_GET['Users'])) {
         $model->attributes = $_GET['Users'];
         if (!empty($model->id)) {
             $criteria->addCondition('id = "' . $model->id . '"');
         }
         if (!empty($model->password)) {
             $criteria->addCondition('password = "' . $model->password . '"');
         }
         if (!empty($model->role)) {
             $criteria->addCondition('role = "' . $model->role . '"');
         }
     }
     $session['Users_records'] = Users::model()->findAll($criteria);
     $this->render('index', array('model' => $model));
 }
开发者ID:AndressJose,项目名称:sistema-examenes,代码行数:26,代码来源:UsersController.php

示例8: actionIndex

 /**
  * Manages all models.
  */
 public function actionIndex()
 {
     $model = new Users('search');
     $model->unsetAttributes();
     // clear any default values
     if (isset($_GET['Users'])) {
         $model->attributes = $_GET['Users'];
     }
     $model->role_id = 2;
     $this->render('index', array('model' => $model, 'actions' => $this->listActionsCanAccess));
 }
开发者ID:jasonhai,项目名称:onehome,代码行数:14,代码来源:ManageadminController.php

示例9: actionAdmin

 /**
  * Manages all models.
  */
 public function actionAdmin()
 {
     $model = new Users('search');
     $model->unsetAttributes();
     // clear any default values
     /*var_dump("<pre>".print_r($model,TRUE)."</pre>");*/
     if (isset($_GET['Users'])) {
         $model->attributes = $_GET['Users'];
     }
     $this->render('admin', array('model' => $model));
 }
开发者ID:josemanuel3dx,项目名称:TestYii,代码行数:14,代码来源:UsersController.php

示例10: actionAdmin

 /**
  * Manages all models.
  */
 public function actionAdmin()
 {
     if (!Yii::app()->user->checkAccess('viewUsers')) {
         throw new CHttpException(403);
     }
     $model = new Users('search');
     $model->unsetAttributes();
     // clear any default values
     if (isset($_GET['Users'])) {
         $model->attributes = $_GET['Users'];
     }
     $this->render('admin', array('model' => $model));
 }
开发者ID:GitareMan,项目名称:personal-maps,代码行数:16,代码来源:UsersController.php

示例11: actionList_users

 public function actionList_users()
 {
     if (Yii::app()->user->isGuest || !Admins::model()->checkAccess(Yii::app()->user->role, Yii::app()->params['permission']['3'])) {
         $this->redirect($this->createAbsoluteUrl('default/index'));
     }
     $model = new Users('search');
     $model->unsetAttributes();
     if (isset($_GET['Users'])) {
         $model->setAttributes($_GET['Users'], false);
     }
     $roles = CHtml::listData(Roles::model()->findAll(), 'idRole', 'description');
     $this->render('users/list_users', array('model' => $model, 'roles' => $roles));
 }
开发者ID:vitalya-xxx,项目名称:vitacod.ru,代码行数:13,代码来源:DefaultController.php

示例12: actionAdmin

	public function actionAdmin()
	{
        if(Yii::app()->user->checkAccess('admin')){
            $model=new Users('search');
            $model->unsetAttributes();  // clear any default values
            if(isset($_GET['Users']))
                $model->attributes=$_GET['Users'];

            $this->render('admin',array(
                'model'=>$model,
            ));
        } else {
            $this->redirect('/admin/user/login');
        }
	}
开发者ID:schiz,项目名称:teff,代码行数:15,代码来源:UserController.php

示例13: getByEmail

 /**
  *
  * @param usersData $data
  * @return type 
  */
 public function getByEmail($data)
 {
     $userModel = new Users();
     $userModel->unsetAttributes();
     $user = $userModel->findByAttributes(array('email' => $data->email));
     $result = $user ? true : false;
     $resultData = $user ? $user->attributes : array();
     $body = json_encode(array('result' => $result, 'data' => $resultData));
     return $this->response->type('json')->goodResponse($body);
 }
开发者ID:salem-dev-acc,项目名称:yiiapp,代码行数:15,代码来源:UsersserviceController.php

示例14: actionIndex

 /**
  * Lists all models.
  */
 public function actionIndex()
 {
     $model = new Users('search');
     $model->unsetAttributes();
     // clear any default values
     if (isset($_GET['Users'])) {
         $model->attributes = $_GET['Users'];
     }
     $model->pageSize = 25;
     // Retrive users who have been sent an invitation
     $criteria = new CDbCriteria();
     $criteria->addCondition('status = :status');
     $criteria->params = array(':status' => Users::PENDING_INVITATION);
     $invitees = new CActiveDataProvider('Users', array('criteria' => $criteria));
     $this->render('index', array('model' => $model, 'invitees' => $invitees));
 }
开发者ID:fandikurnia,项目名称:CiiMS,代码行数:19,代码来源:UsersController.php

示例15: actionIndex

 /**
  * Lists all models.
  */
 public function actionIndex()
 {
     if (Yii::app()->user->isGuest) {
         $model = new Users('search');
         $model->unsetAttributes();
         // clear any default values
         if (isset($_GET['Users'])) {
             $model->attributes = $_GET['Users'];
         }
         $this->render('index', array('model' => $model));
     } else {
         $this->redirect(array('/'));
     }
 }
开发者ID:schur-maksim,项目名称:happymoments.ua,代码行数:17,代码来源:RegisterController.php


注:本文中的Users::unsetAttributes方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。