|
|
@ -2414,8 +2414,8 @@ class SurveyUtil |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
$users_array = array_unique($users_array); |
|
|
|
$users_array = array_unique($users_array); |
|
|
|
foreach ($users_array as $key => $value) { |
|
|
|
foreach ($users_array as $value) { |
|
|
|
if (!isset($value) || '' == $value) { |
|
|
|
if (empty($value)) { |
|
|
|
continue; |
|
|
|
continue; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
@ -2443,7 +2443,7 @@ class SurveyUtil |
|
|
|
$new_user = true; |
|
|
|
$new_user = true; |
|
|
|
if (!array_key_exists($value, $survey_invitations)) { |
|
|
|
if (!array_key_exists($value, $survey_invitations)) { |
|
|
|
self::saveInvitation( |
|
|
|
self::saveInvitation( |
|
|
|
$value, |
|
|
|
api_get_user_entity($value), |
|
|
|
$invitation_code, |
|
|
|
$invitation_code, |
|
|
|
api_get_utc_datetime(time(), null, true), |
|
|
|
api_get_utc_datetime(time(), null, true), |
|
|
|
$survey, |
|
|
|
$survey, |
|
|
@ -2478,7 +2478,7 @@ class SurveyUtil |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
public static function saveInvitation( |
|
|
|
public static function saveInvitation( |
|
|
|
$user, |
|
|
|
User $user, |
|
|
|
$invitationCode, |
|
|
|
$invitationCode, |
|
|
|
$reminderDate, |
|
|
|
$reminderDate, |
|
|
|
CSurvey $survey, |
|
|
|
CSurvey $survey, |
|
|
@ -2486,10 +2486,6 @@ class SurveyUtil |
|
|
|
SessionEntity $session = null, |
|
|
|
SessionEntity $session = null, |
|
|
|
CGroup $group = null |
|
|
|
CGroup $group = null |
|
|
|
): ?CSurveyInvitation { |
|
|
|
): ?CSurveyInvitation { |
|
|
|
/*var_dump($params); |
|
|
|
|
|
|
|
array(6) { ["c_id"]=> int(1) ["session_id"]=> int(0) ["user"]=> int(61) ["survey_code"]=> string(3) "aaa |
|
|
|
|
|
|
|
" ["invitation_code"]=> string(32) "6046726ce1894c21437377a53903714a" ["invitation_date"]=> string(19) "2021-03-19 09:06:50" } |
|
|
|
|
|
|
|
*/ |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$invitation = new CSurveyInvitation(); |
|
|
|
$invitation = new CSurveyInvitation(); |
|
|
|
$invitation |
|
|
|
$invitation |
|
|
|