Пример #1
0
 public function init()
 {
     parent::init();
     if (!OW::getUser()->isAuthenticated()) {
         throw new AuthenticateException();
     }
 }
Пример #2
0
 public function init()
 {
     parent::init();
     if (!OW::getUser()->isAuthenticated()) {
         throw new AuthenticateException();
     }
     if (!OW::getUser()->isAuthorized('photo', 'upload')) {
         $this->returnResponse(array('status' => self::STATUS_ERROR, 'result' => false, 'msg' => OW::getLanguage()->text('photo', 'auth_upload_permissions')));
     }
 }