From 2be4a151b14c7385b3a852b9321e7a5348c91e63 Mon Sep 17 00:00:00 2001 From: Brian Shaughnessy Date: Wed, 5 Aug 2015 10:28:27 -0400 Subject: [PATCH] CRM-16968 allow user creation on profile edit forms --- CRM/Profile/Form.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/CRM/Profile/Form.php b/CRM/Profile/Form.php index 59a7096096..f12a95e796 100644 --- a/CRM/Profile/Form.php +++ b/CRM/Profile/Form.php @@ -823,7 +823,8 @@ class CRM_Profile_Form extends CRM_Core_Form { $this->setDefaultsValues(); $action = CRM_Utils_Request::retrieve('action', 'String', $this, FALSE, NULL); - if ($this->_mode == self::MODE_CREATE) { + + if ($this->_mode == self::MODE_CREATE || $this->_mode == self::MODE_EDIT) { CRM_Core_BAO_CMSUser::buildForm($this, $this->_gid, $emailPresent, $action); } else { @@ -1324,7 +1325,7 @@ class CRM_Profile_Form extends CRM_Core_Form { //create CMS user (if CMS user option is selected in profile) if (!empty($params['cms_create_account']) && - $this->_mode == self::MODE_CREATE + ( $this->_mode == self::MODE_CREATE || $this->_mode == self::MODE_EDIT ) ) { $params['contactID'] = $this->_id; if (!CRM_Core_BAO_CMSUser::create($params, $this->_mail)) { -- 2.25.1