File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -60,20 +60,27 @@ protected function sendSignMailNotification(
6060 if ($ identifyMethod ->getEntity ()->isDeletedAccount ()) {
6161 return ;
6262 }
63- if ($ this ->isNotificationDisabledAtActivity ($ identifyMethod ->getEntity ()->getIdentifierValue (), SendSignNotificationEvent::FILE_TO_SIGN )) {
64- return ;
65- }
6663 $ email = '' ;
6764 if ($ identifyMethod ->getName () === 'account ' ) {
65+ $ userId = $ identifyMethod ->getEntity ()->getIdentifierValue ();
6866 $ email = $ this ->userManager
69- ->get ($ identifyMethod -> getEntity ()-> getIdentifierValue () )
67+ ->get ($ userId )
7068 ->getEMailAddress ();
7169 } elseif ($ identifyMethod ->getName () === 'email ' ) {
7270 $ email = $ identifyMethod ->getEntity ()->getIdentifierValue ();
7371 }
7472 if (empty ($ email )) {
7573 return ;
7674 }
75+
76+ $ users = $ this ->userManager ->getByEmail ($ email );
77+ if (count ($ users ) === 1 ) {
78+ $ userId = $ users [0 ]->getUID ();
79+ if ($ this ->isNotificationDisabledAtActivity ($ userId , SendSignNotificationEvent::FILE_TO_SIGN )) {
80+ return ;
81+ }
82+ }
83+
7784 $ isFirstNotification = $ this ->signRequestMapper ->incrementNotificationCounter ($ signRequest , 'mail ' );
7885 if ($ isFirstNotification ) {
7986 $ this ->mail ->notifyUnsignedUser ($ signRequest , $ email );
You can’t perform that action at this time.
0 commit comments