Handled user account failure and sender acknowledgement
Created by: Edzelopez
Merge request reports
Activity
Filter activity
354 'return' => 'contact_id_a', 355 ]); 356 if ($relationship['count'] > 0 && !empty($relationship['values'][$relationship['id']]['contact_id_a'])) { 357 $primaryCid = $relationship['values'][$relationship['id']]['contact_id_a']; 358 } 356 359 // Create drupal account if not exists. 357 self::createUserAccount($cid); 360 if (!self::createUserAccount($primaryCid)) { 361 // Set status message indicating that user account creation was unsuccessful. 362 $userUrl = CRM_Utils_System::url('civicrm/contact/view/useradd', "reset=1&action=add&cid=$primaryCid"); 363 CRM_Core_Session::setStatus(ts('There was an error creating the user account. Please proceed to add one here: %1', [1 => $userUrl]), ts('Warning'), 'alert'); 364 } 358 365 359 366 // Send Mail 360 self::sendMessage($cid, APPROVED_MESSAGE); 367 self::sendMessage($primaryCid, APPROVED_MESSAGE);
Please register or sign in to reply