public function subscribeEmail($email) { $user_id = $this->getUserIdByEmail($email); if ($user_id) { $this->courseParticipants->add($user_id, IL_CRS_MEMBER); $this->emailsFound[] = $email; } else { $this->emailsNotFound[] = $email; } }
/** * add course admin after import file * @return */ protected function afterImport(ilObject $a_new_object) { global $ilUser; $part = new ilCourseParticipants($a_new_object->getId()); $part->add($ilUser->getId(), ilCourseConstants::CRS_ADMIN); $part->updateNotification($ilUser->getId(), 1); parent::afterImport($a_new_object); }