LLMS_Notification_Controller_Quiz_Passed::get_subscriber( string $subscriber )
Takes a subscriber type (student, author, etc) and retrieves a User ID
Parameters Parameters
- $subscriber
-
(string) (Required) subscriber type string
Return Return
(int|false)
Source Source
File: includes/notifications/controllers/class.llms.notification.controller.quiz.passed.php
protected function get_subscriber( $subscriber ) {
switch ( $subscriber ) {
case 'course_author':
if ( $this->course ) {
$uid = $this->course->get( 'author' );
} else {
$uid = $this->quiz->post->post_author;
}
break;
case 'student':
$uid = $this->user_id;
break;
default:
$uid = false;
}
return $uid;
}
Expand full source code Collapse full source code View on GitHub
Changelog Changelog
| Version | Description |
|---|---|
| 3.8.0 | Introduced. |