Skip to content

Commit

Permalink
Wrong begin date saved if user participate to an event #761
Browse files Browse the repository at this point in the history
  • Loading branch information
Fasse committed May 10, 2018
1 parent 5b675f1 commit bcb2917
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
1 change: 1 addition & 0 deletions adm_program/installation/db_scripts/update_3_3.xml
Original file line number Diff line number Diff line change
Expand Up @@ -106,5 +106,6 @@
<step id="650">ComponentUpdateSteps::updateStepMigrateToStandardMenu</step>
<step id="660">ComponentUpdateSteps::updateStepDownloadOrgFolderName</step>
<step id="670">UPDATE %PREFIX%_user_fields SET usf_registration = 1 WHERE usf_name_intern IN ('LAST_NAME', 'FIRST_NAME', 'EMAIL')</step>
<step id="680">UPDATE %PREFIX%_members SET mem_begin = '2018-04-01' WHERE mem_begin = '0000-00-00'</step>
<step>stop</step>
</update>
5 changes: 5 additions & 0 deletions adm_program/modules/dates/dates_function.php
Original file line number Diff line number Diff line change
Expand Up @@ -627,6 +627,11 @@
$member->readDataByColumns(array('mem_rol_id' => $date->getValue('dat_rol_id'), 'mem_usr_id' => $getUserId));
$member->setValue('mem_comment', $postUserComment); // Comments will be safed in any case. Maybe it is a documentation afterwards by a leader or admin

if ($member->isNewRecord())
{
$member->setValue('mem_begin', DATE_NOW);
}

// Now check participants limit and save guests if possible
if ($date->getValue('dat_max_members') > 0)
{
Expand Down

0 comments on commit bcb2917

Please sign in to comment.