@@ -715,8 +715,6 @@ private function importTeachers($file, $moveFile = true)
715
715
716
716
if (!empty ($ data )) {
717
717
$ this ->logger ->addInfo (count ($ data )." records found. " );
718
- $ expirationDateOnCreation = api_get_utc_datetime (strtotime ("+ " .intval ($ this ->expirationDateInUserCreation )."years " ));
719
- $ expirationDateOnUpdate = api_get_utc_datetime (strtotime ("+ " .intval ($ this ->expirationDateInUserUpdate )."years " ));
720
718
721
719
$ batchSize = $ this ->batchSize ;
722
720
$ em = Database::getManager ();
@@ -752,7 +750,7 @@ private function importTeachers($file, $moveFile = true)
752
750
$ row ['phone ' ],
753
751
null , //$row['picture'], //picture
754
752
$ row ['auth_source ' ], // ?
755
- $ expirationDateOnCreation , //'0000-00-00 00:00:00', //$row['expiration_date'], //$expiration_date = '0000-00-00 00:00:00' ,
753
+ null ,
756
754
1 , //active
757
755
0 ,
758
756
null , // extra
@@ -800,7 +798,7 @@ private function importTeachers($file, $moveFile = true)
800
798
$ userInfo ['official_code ' ],
801
799
$ userInfo ['phone ' ],
802
800
$ userInfo ['picture_uri ' ],
803
- $ expirationDateOnUpdate ,
801
+ null ,
804
802
$ userInfo ['active ' ],
805
803
null , //$creator_id = null,
806
804
0 , //$hr_dept_id = 0,
@@ -892,13 +890,6 @@ private function importStudents($file, $moveFile = true)
892
890
$ language = $ this ->defaultLanguage ;
893
891
$ this ->logger ->addInfo (count ($ data )." records found. " );
894
892
895
- $ expirationDateOnCreate = api_get_utc_datetime (
896
- strtotime ("+ " .intval ($ this ->expirationDateInUserCreation )."years " )
897
- );
898
- $ expirationDateOnUpdate = api_get_utc_datetime (
899
- strtotime ("+ " .intval ($ this ->expirationDateInUserUpdate )."years " )
900
- );
901
-
902
893
$ counter = 1 ;
903
894
$ secondsInYear = 365 * 24 * 60 * 60 ;
904
895
@@ -965,7 +956,7 @@ private function importStudents($file, $moveFile = true)
965
956
$ row ['phone ' ],
966
957
null , //$row['picture'], //picture
967
958
$ row ['auth_source ' ], // ?
968
- $ expirationDateOnCreate ,
959
+ null ,
969
960
1 , //active
970
961
0 ,
971
962
null , // extra
@@ -1000,11 +991,6 @@ private function importStudents($file, $moveFile = true)
1000
991
continue ;
1001
992
}
1002
993
1003
- if (isset ($ row ['action ' ]) && $ row ['action ' ] === 'delete ' ) {
1004
- // Inactive one year later
1005
- $ userInfo ['expiration_date ' ] = api_get_utc_datetime (api_strtotime (time () + $ secondsInYear ));
1006
- }
1007
-
1008
994
$ password = $ row ['password ' ]; // change password
1009
995
$ email = $ row ['email ' ]; // change email
1010
996
$ resetPassword = 2 ; // allow password change
@@ -1075,7 +1061,7 @@ private function importStudents($file, $moveFile = true)
1075
1061
$ userInfo ['official_code ' ],
1076
1062
$ userInfo ['phone ' ],
1077
1063
$ userInfo ['picture_uri ' ],
1078
- $ expirationDateOnUpdate ,
1064
+ null ,
1079
1065
$ userInfo ['active ' ],
1080
1066
null , //$creator_id = null,
1081
1067
0 , //$hr_dept_id = 0,
0 commit comments