@@ -39,31 +39,17 @@ public static function getInstance() {
3939 * @param array array of event specific parameters
4040 */
4141 public function handleEvent ($ a_component , $ a_event , $ a_parameter ) {
42- if ($ a_component == 'Modules/Course ' AND $ a_event == 'update ' ) {
43-
44-
45- // $ilUser = new ilObjUser();
46- // $ilUser->setEmail('info@fschmid.ch');
47- // $ilUser->setPasswd('homer');
48- // $ilUser->setActive(1);
49- // $ilUser->setTimeLimitUnlimited(true);
50- // $ilUser->setFirstname('Fabian');
51- // $ilUser->setLastname('Schmid');
52- // $a_str = 'fschmid' . rand(100, 99999);
53- // $ilUser->create();
54- // $ilUser->setLogin($a_str);
55- // $ilUser->saveAsNew(false);
56- // ilUtil::sendInfo($a_str, true);
57- // /**
58- // * @var $ilUserSetting ilUserSetting
59- // */
60- // global $ilUser;
61- // foreach (ilUserSetting::where(array( 'status' => ilUserSetting::STATUS_ACTIVE ))->get() as $ilUserSetting) {
62- // $ilUserSetting->doAssignements($ilUser);
63- // }
64- }
65-
66- if ($ a_component == 'Services/User ' AND $ a_event == 'saveAsNew ' ) {
42+ // if ($a_component == 'Modules/Course' AND $a_event == 'update') {
43+ // global $ilUser;
44+ // /**
45+ // * @var $ilUserSetting ilUserSetting
46+ // */
47+ // foreach (ilUserSetting::where(array( 'status' => ilUserSetting::STATUS_ACTIVE ))->get() as $ilUserSetting) {
48+ //// $ilUserSetting->doAssignements($ilUser);
49+ // }
50+ // }
51+
52+ if ($ a_component == 'Services/User ' AND ($ a_event == 'saveAsNew ' OR $ a_event == 'afterCreate ' )) {
6753 /**
6854 * @var $ilUser ilObjUser
6955 */
@@ -91,6 +77,14 @@ public function getPluginName() {
9177 }
9278
9379
80+ /**
81+ * @return bool
82+ */
83+ public static function is55 () {
84+ return ((int )str_ireplace ('. ' , '' , ILIAS_VERSION_NUMERIC )) >= 500 ;
85+ }
86+
87+
9488 public function updateLanguageFiles () {
9589 ini_set ('auto_detect_line_endings ' , true );
9690 $ path = substr (__FILE__ , 0 , strpos (__FILE__ , 'classes ' )) . 'lang/ ' ;
0 commit comments