public function get_requester() {
        global $DB;
        static $requesters= array();
        if (!array_key_exists($this->properties->requester, $requesters)) {
            $requesters[$this->properties->requester] = $DB->get_record('user', array('id'=>$this->properties->requester));
        }
        return $requesters[$this->properties->requester];
    }
public function get_requester() {
        global $DB;
        static $requesters= array();
        if (!array_key_exists($this->properties->requester, $requesters)) {
            $requesters[$this->properties->requester] = $DB->get_record('user', array('id'=>$this->properties->requester));
        }
        return $requesters[$this->properties->requester];
    }
public function get_requester ( ) { global $ DB ; static $ requesters = array ( ) ; if ( ! array_key_exists ( $ this -> properties -> requester , $ requesters ) ) { $ requesters [ $ this -> properties -> requester ] = $ DB -> get_record ( 'user' , array ( 'id' => $ this -> properties -> requester ) ) ; } return $ requesters [ $ this -> properties -> requester ] ; }
Returns the user who requested this course

Uses a static var to cache the results and cut down the number of db queries

@staticvar array $requesters An array of cached users
@return stdClass The user who requested the course
Returns the user who requested this course