File tree Expand file tree Collapse file tree 1 file changed +9
-2
lines changed Expand file tree Collapse file tree 1 file changed +9
-2
lines changed Original file line number Diff line number Diff line change @@ -341,11 +341,18 @@ public function saveAction()
341341 }
342342
343343 try {
344- $ admin = Mage::getModel ('zendesk/api_users ' )->me ();
344+ $ admin = Mage::getSingleton ('admin/session ' )->getUser ();
345+ $ submitter = Mage::getModel ('zendesk/api_users ' )->find ($ admin ->getEmail ());
346+
347+ if (!$ submitter ) {
348+ // Default to the user set in the agent email field under Configuration
349+ $ submitter = Mage::getModel ('zendesk/api_users ' )->me ();
350+ }
351+
345352 $ ticket = array (
346353 'ticket ' => array (
347354 'requester_id ' => $ requesterId ,
348- 'submitter_id ' => $ admin ['id ' ],
355+ 'submitter_id ' => $ submitter ['id ' ],
349356 'subject ' => $ data ['subject ' ],
350357 'status ' => $ data ['status ' ],
351358 'priority ' => $ data ['priority ' ],
You can’t perform that action at this time.
0 commit comments