public function __construct() { $this->timestamp = time(); $this->ip = $_SERVER['REMOTE_ADDR']; if (\DF\Auth::isLoggedIn()) { $user = \DF\Auth::getLoggedInUser(); $this->user = $user; } }
public function __construct() { $this->ip = self::getIp(); $this->timestamp = time(); if (\DF\Auth::isLoggedIn()) { $user = \DF\Auth::getLoggedInUser(); $this->user = $user; } }
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); }