示例#1
0
 public function _on_updating()
 {
     if (midcom::get('auth')->user) {
         // Place current user in the page authors list
         $authors = explode('|', substr($this->metadata->authors, 1, -1));
         if (!in_array(midcom::get('auth')->user->guid, $authors)) {
             $authors[] = midcom::get('auth')->user->guid;
             $this->metadata->authors = '|' . implode('|', $authors) . '|';
         }
     }
     return parent::_on_updating();
 }