@@ -1199,16 +1199,15 @@ function ($email) {
11991199 );
12001200} else {
12011201 $ allow = ('true ' === api_get_setting ('registration.allow_double_validation_in_registration ' ));
1202- $ termsEnabled = ('true ' === api_get_setting ('allow_terms_conditions ' ));
12031202
12041203 ChamiloHelper::addLegalTermsFields ($ form , $ userAlreadyRegisteredShowTerms );
12051204
12061205 /**
1207- * The "double validation" (Validate -> Register) is legacy UX.
1208- * When Terms & Conditions are enabled, it becomes redundant and may create a confusing 2-step flow.
1209- * Keep it only for platforms that explicitly want it without T&C .
1206+ * Double validation must be controlled ONLY by:
1207+ * registration.allow_double_validation_in_registration
1208+ * It must not depend on Terms & Conditions activation .
12101209 */
1211- if ($ allow && !$ termsEnabled && ! $ termActivated ) {
1210+ if ($ allow && !$ termActivated ) {
12121211 $ htmlHeadXtra [] = '<script>
12131212 $(document).ready(function() {
12141213 $("#pre_validation").click(function() {
@@ -1479,6 +1478,7 @@ function ($email) {
14791478 $ user ['mail ' ] = $ values ['email ' ];
14801479 $ user ['language ' ] = $ values ['language ' ];
14811480 $ user ['user_id ' ] = $ userId ;
1481+ $ user ['id ' ] = $ userId ;
14821482 Session::write ('_user ' , $ user );
14831483
14841484 $ is_allowedCreateCourse = isset ($ values ['status ' ]) && 1 == $ values ['status ' ];
@@ -1509,6 +1509,7 @@ function ($email) {
15091509 'mail ' => $ values ['email ' ],
15101510 'language ' => $ values ['language ' ],
15111511 'user_id ' => $ userId ,
1512+ 'id ' => $ userId ,
15121513 ];
15131514
15141515 $ sessionHandler ->set ('_user ' , $ userData );
0 commit comments