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


PHP CRM_Core_BAO_UFGroup::getEditHTML方法代码示例

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


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

示例1: crm_uf_get_profile_html_by_id

/** 
 * get the html for the form that represents this particular group 
 * 
 * @param int     $userID    the user id that we are actually editing 
 * @param int     $profileID the id of the group we are interested in 
 * @param int     $action    the action of the form 
 * @param boolean $register  is this the registration form 
 * @param boolean $reset     should we reset the form? 
 * 
 * @return string            the html for the form 
 * @static 
 * @access public 
 */
function crm_uf_get_profile_html_by_id($userID, $profileID, $action = null, $register = false, $reset = false)
{
    return CRM_Core_BAO_UFGroup::getEditHTML($userID, null, $action, $register, $reset, $profileID);
}
开发者ID:bhirsch,项目名称:voipdrupal-4.7-1.0,代码行数:17,代码来源:UFGroup.php

示例2:

</table>
<?php 
if (isset($this->params)) {
    echo $this->params->render('params');
}
?>

<?php 
require_once 'administrator/components/com_civicrm/civicrm.settings.php';
require_once 'CRM/Core/Config.php';
$civiConfig =& CRM_Core_Config::singleton();
$civiConfig->formKeyDisable = true;
require_once 'CRM/Core/BAO/UFMatch.php';
$userID = CRM_Core_BAO_UFMatch::getContactId($this->user->id);
require_once 'CRM/Core/BAO/UFGroup.php';
echo CRM_Core_BAO_UFGroup::getEditHTML($userID, null, 2, true, true, null, false, 'Individual');
?>

	<button class="button" type="submit" onclick="submitbutton( this.form );return false;"><?php 
echo JText::_('Save');
?>
</button>

	<input type="hidden" name="username" value="<?php 
echo $this->user->get('username');
?>
" />
	<input type="hidden" name="id" value="<?php 
echo $this->user->get('id');
?>
" />
开发者ID:ksecor,项目名称:civicrm,代码行数:31,代码来源:form.php

示例3: civicrm_uf_profile_html_by_id_get

/**
 * get the html for the form that represents this particular group
 *
 * @param int     $userID    the user id that we are actually editing
 * @param int     $profileID the id of the group we are interested in
 * @param int     $action    the action of the form
 * @param boolean $register  is this the registration form
 * @param boolean $reset     should we reset the form?
 *
 * @return string            the html for the form
 * @static
 * @access public
 */
function civicrm_uf_profile_html_by_id_get($userID, $profileID, $action = NULL, $register = FALSE, $reset = FALSE)
{
    if ((int) $userID > 0 and (int) $profileID > 0) {
        return CRM_Core_BAO_UFGroup::getEditHTML($userID, NULL, $action, $register, $reset, $profileID);
    } else {
        return civicrm_create_error('Params need to be positive integers.');
    }
}
开发者ID:peteainsworth,项目名称:civicrm-4.2.9-drupal,代码行数:21,代码来源:UFGroup.php

示例4:

	</td>
</tr>
<tr>
	<td colspan="2" height="40">
		<?php 
echo JText::_('REGISTER_REQUIRED');
?>
	</td>
</tr>
</table>

<?php 
require_once 'administrator/components/com_civicrm/civicrm.settings.php';
require_once 'CRM/Core/Config.php';
$civiConfig =& CRM_Core_Config::singleton();
$civiConfig->formKeyDisable = true;
require_once 'CRM/Core/BAO/UFGroup.php';
echo CRM_Core_BAO_UFGroup::getEditHTML(null, null, 1, true, true, null, false, 'Individual');
?>
	<button class="button validate" type="submit"><?php 
echo JText::_('Register');
?>
</button>
	<input type="hidden" name="task" value="register_save" />
	<input type="hidden" name="id" value="0" />
	<input type="hidden" name="gid" value="0" />
	<?php 
echo JHTML::_('form.token');
?>
</form>
开发者ID:ksecor,项目名称:civicrm,代码行数:30,代码来源:default.php

示例5: register_save

 /**
  * Save user registration and notify users and admins if required
  * @return void
  */
 function register_save()
 {
     global $mainframe;
     // Check for request forgeries
     JRequest::checkToken() or jexit('Invalid Token');
     // Get required system objects
     $user = clone JFactory::getUser();
     $pathway =& $mainframe->getPathway();
     $config =& JFactory::getConfig();
     $authorize =& JFactory::getACL();
     $document =& JFactory::getDocument();
     // If user registration is not allowed, show 403 not authorized.
     $usersConfig =& JComponentHelper::getParams('com_users');
     if ($usersConfig->get('allowUserRegistration') == '0') {
         JError::raiseError(403, JText::_('Access Forbidden'));
         return;
     }
     // do civicrm validation here
     require_once 'administrator/components/com_civicrm/civicrm.settings.php';
     require_once 'CRM/Core/Config.php';
     $civiConfig =& CRM_Core_Config::singleton();
     $civiConfig->formKeyDisable = true;
     require_once 'CRM/Core/BAO/UFGroup.php';
     $errors = CRM_Core_BAO_UFGroup::isValid(null, null, true);
     if (is_array($errors)) {
         $msg = null;
         foreach ($errors as $name => $error) {
             $msg .= "{$name}: {$error}<br/>";
         }
         JError::raiseWarning('', JText::_($msg));
         $this->register();
         return false;
     }
     // Initialize new usertype setting
     $newUsertype = $usersConfig->get('new_usertype');
     if (!$newUsertype) {
         $newUsertype = 'Registered';
     }
     // Bind the post array to the user object
     if (!$user->bind(JRequest::get('post'), 'usertype')) {
         JError::raiseError(500, $user->getError());
     }
     // Set some initial user values
     $user->set('id', 0);
     $user->set('usertype', '');
     $user->set('gid', $authorize->get_group_id('', $newUsertype, 'ARO'));
     $date =& JFactory::getDate();
     $user->set('registerDate', $date->toMySQL());
     // If user activation is turned on, we need to set the activation information
     $useractivation = $usersConfig->get('useractivation');
     if ($useractivation == '1') {
         jimport('joomla.user.helper');
         $user->set('activation', md5(JUserHelper::genRandomPassword()));
         $user->set('block', '1');
     }
     // If there was an error with registration, set the message and display form
     if (!$user->save()) {
         JError::raiseWarning('', JText::_($user->getError()));
         $this->register();
         return false;
     }
     // Send registration confirmation mail
     $password = JRequest::getString('password', '', 'post', JREQUEST_ALLOWRAW);
     $password = preg_replace('/[\\x00-\\x1F\\x7F]/', '', $password);
     //Disallow control chars in the email
     UserController::_sendMail($user, $password);
     // if this was a successful save, call civicrm code to save the contact
     if ($user->id) {
         require_once 'CRM/Core/BAO/UFMatch.php';
         CRM_Core_BAO_UFMatch::synchronize($user, true, 'Joomla', 'Individual');
         $userID = CRM_Core_BAO_UFMatch::getContactId($user->id);
         if ($userID) {
             require_once 'CRM/Core/BAO/UFGroup.php';
             CRM_Core_BAO_UFGroup::getEditHTML($userID, null, 2, true, false, null, false, 'Individual');
             $session =& CRM_Core_Session::singleton();
             $session->reset();
         }
     }
     // Everything went fine, set relevant message depending upon user activation state and display message
     if ($useractivation == 1) {
         $message = JText::_('REG_COMPLETE_ACTIVATE');
     } else {
         $message = JText::_('REG_COMPLETE');
     }
     //TODO :: this needs to be replace by raiseMessage
     JError::raiseNotice('', $message);
     $this->register();
 }
开发者ID:ksecor,项目名称:civicrm,代码行数:92,代码来源:controller.php


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