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