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


PHP Application_Model_User::GetUserData方法代码示例

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


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

示例1: getUserDataAction

 public function getUserDataAction()
 {
     $id = $this->_getParam('id');
     $this->view->entries = Application_Model_User::GetUserData($id);
 }
开发者ID:RadioCampusFrance,项目名称:airtime,代码行数:5,代码来源:UserController.php

示例2: init

 public function init()
 {
     /*
             $this->addElementPrefixPath('Application_Validate',
                                         '../application/validate',
                                         'validate');
                                         * */
     $currentUser = Application_Model_User::getCurrentUser();
     $currentUserId = $currentUser->getId();
     $userData = Application_Model_User::GetUserData($currentUserId);
     $notEmptyValidator = Application_Form_Helper_ValidationTypes::overrideNotEmptyValidator();
     $emailValidator = Application_Form_Helper_ValidationTypes::overrideEmailAddressValidator();
     $notDemoValidator = new Application_Validate_NotDemoValidate();
     $this->setDecorators(array(array('ViewScript', array('viewScript' => 'form/edit-user.phtml', "currentUser" => $currentUser->getLogin()))));
     $this->setAttrib('id', 'current-user-form');
     $hidden = new Zend_Form_Element_Hidden('cu_user_id');
     $hidden->setDecorators(array('ViewHelper'));
     $hidden->setValue($userData["id"]);
     $this->addElement($hidden);
     $login = new Zend_Form_Element_Text('cu_login');
     $login->setLabel(_('Username:'));
     $login->setValue($userData["login"]);
     $login->setAttrib('class', 'input_text');
     $login->setAttrib('readonly', 'readonly');
     $login->setRequired(true);
     $login->addValidator($notEmptyValidator);
     $login->addFilter('StringTrim');
     $login->setDecorators(array('viewHelper'));
     $this->addElement($login);
     $password = new Zend_Form_Element_Password('cu_password');
     $password->setLabel(_('Password:'));
     $password->setAttrib('class', 'input_text');
     $password->setRequired(true);
     $password->addFilter('StringTrim');
     $password->addValidator($notEmptyValidator);
     $password->setDecorators(array('viewHelper'));
     $this->addElement($password);
     $passwordVerify = new Zend_Form_Element_Password('cu_passwordVerify');
     $passwordVerify->setLabel(_('Verify Password:'));
     $passwordVerify->setAttrib('class', 'input_text');
     $passwordVerify->setRequired(true);
     $passwordVerify->addFilter('StringTrim');
     $passwordVerify->addValidator($notEmptyValidator);
     $passwordVerify->addValidator($notDemoValidator);
     $passwordVerify->setDecorators(array('viewHelper'));
     $this->addElement($passwordVerify);
     $firstName = new Zend_Form_Element_Text('cu_first_name');
     $firstName->setLabel(_('Firstname:'));
     $firstName->setValue($userData["first_name"]);
     $firstName->setAttrib('class', 'input_text');
     $firstName->addFilter('StringTrim');
     $firstName->setDecorators(array('viewHelper'));
     $this->addElement($firstName);
     $lastName = new Zend_Form_Element_Text('cu_last_name');
     $lastName->setLabel(_('Lastname:'));
     $lastName->setValue($userData["last_name"]);
     $lastName->setAttrib('class', 'input_text');
     $lastName->addFilter('StringTrim');
     $lastName->setDecorators(array('viewHelper'));
     $this->addElement($lastName);
     $email = new Zend_Form_Element_Text('cu_email');
     $email->setLabel(_('Email:'));
     $email->setValue($userData["email"]);
     $email->setAttrib('class', 'input_text');
     $email->addFilter('StringTrim');
     $email->setRequired(true);
     $email->addValidator($notEmptyValidator);
     $email->addValidator($emailValidator);
     $email->setDecorators(array('viewHelper'));
     $this->addElement($email);
     $cellPhone = new Zend_Form_Element_Text('cu_cell_phone');
     $cellPhone->setLabel(_('Mobile Phone:'));
     $cellPhone->setValue($userData["cell_phone"]);
     $cellPhone->setAttrib('class', 'input_text');
     $cellPhone->addFilter('StringTrim');
     $cellPhone->setDecorators(array('viewHelper'));
     $this->addElement($cellPhone);
     $skype = new Zend_Form_Element_Text('cu_skype');
     $skype->setLabel(_('Skype:'));
     $skype->setValue($userData["skype_contact"]);
     $skype->setAttrib('class', 'input_text');
     $skype->addFilter('StringTrim');
     $skype->setDecorators(array('viewHelper'));
     $this->addElement($skype);
     $jabber = new Zend_Form_Element_Text('cu_jabber');
     $jabber->setLabel(_('Jabber:'));
     $jabber->setValue($userData["jabber_contact"]);
     $jabber->setAttrib('class', 'input_text');
     $jabber->addFilter('StringTrim');
     $jabber->addValidator($emailValidator);
     $jabber->setDecorators(array('viewHelper'));
     $this->addElement($jabber);
     $locale = new Zend_Form_Element_Select("cu_locale");
     $locale->setLabel(_("Language:"));
     $locale->setMultiOptions(Application_Model_Locale::getLocales());
     $locale->setValue(Application_Model_Preference::GetUserLocale($currentUserId));
     $locale->setDecorators(array('ViewHelper'));
     $this->addElement($locale);
     $timezone = new Zend_Form_Element_Select("cu_timezone");
     $timezone->setLabel(_("Interface Timezone:"));
//.........这里部分代码省略.........
开发者ID:RadioCampusFrance,项目名称:airtime,代码行数:101,代码来源:EditUser.php


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