示例#1
0
 public function __construct()
 {
     $this->timestamp = time();
     $this->ip = $_SERVER['REMOTE_ADDR'];
     if (\DF\Auth::isLoggedIn()) {
         $user = \DF\Auth::getLoggedInUser();
         $this->user = $user;
     }
 }
示例#2
0
 public function __construct()
 {
     $this->ip = self::getIp();
     $this->timestamp = time();
     if (\DF\Auth::isLoggedIn()) {
         $user = \DF\Auth::getLoggedInUser();
         $this->user = $user;
     }
 }
示例#3
0
 public function canManage(User $user = null)
 {
     if ($user === null) {
         $user = \DF\Auth::getLoggedInUser();
     }
     $di = \Phalcon\Di::getDefault();
     $acl = $di->get('acl');
     if ($acl->userAllowed('manage podcasts', $user)) {
         return true;
     }
     return $this->managers->contains($user);
 }