style fixes based upon updated phpcs Drupal standard
[civicrm-core.git] / CRM / Profile / Form.php
index 18fa59910ff3b8184e1c1dd07b1b37e51c97ec1f..babd87a1bb7f1083784c60ef5045eb12bfd73ecb 100644 (file)
@@ -371,9 +371,9 @@ class CRM_Profile_Form extends CRM_Core_Form {
         }
         elseif (!empty($this->_multiRecordFields)
           && (!$this->_multiRecord || !in_array($this->_multiRecord, array(
-                CRM_Core_Action::DELETE,
-                CRM_Core_Action::UPDATE,
-              )))
+            CRM_Core_Action::DELETE,
+            CRM_Core_Action::UPDATE,
+          )))
         ) {
           CRM_Core_Resources::singleton()->addScriptFile('civicrm', 'js/crm.livePage.js', 1, 'html-header');
           //multirecord listing page
@@ -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 {
@@ -975,20 +976,20 @@ class CRM_Profile_Form extends CRM_Core_Form {
 
             $duplicateContactsLinks = '<div class="matching-contacts-found">';
             $duplicateContactsLinks .= ts('One matching contact was found. ', array(
-                'count' => count($contactLinks['rows']),
-                'plural' => '%count matching contacts were found.<br />',
-              ));
+              'count' => count($contactLinks['rows']),
+              'plural' => '%count matching contacts were found.<br />',
+            ));
             if ($contactLinks['msg'] == 'view') {
               $duplicateContactsLinks .= ts('You can View the existing contact.', array(
-                  'count' => count($contactLinks['rows']),
-                  'plural' => 'You can View the existing contacts.',
-                ));
+                'count' => count($contactLinks['rows']),
+                'plural' => 'You can View the existing contacts.',
+              ));
             }
             else {
               $duplicateContactsLinks .= ts('You can View or Edit the existing contact.', array(
-                  'count' => count($contactLinks['rows']),
-                  'plural' => 'You can View or Edit the existing contacts.',
-                ));
+                'count' => count($contactLinks['rows']),
+                'plural' => 'You can View or Edit the existing contacts.',
+              ));
             }
             $duplicateContactsLinks .= '</div>';
             $duplicateContactsLinks .= '<table class="matching-contacts-actions">';
@@ -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)) {