当前位置: 首页>>代码示例>>PHP>>正文


PHP JFactory::GetUser方法代码示例

本文整理汇总了PHP中JFactory::GetUser方法的典型用法代码示例。如果您正苦于以下问题:PHP JFactory::GetUser方法的具体用法?PHP JFactory::GetUser怎么用?PHP JFactory::GetUser使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在JFactory的用法示例。


在下文中一共展示了JFactory::GetUser方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: check

 function check()
 {
     // make published by default and get a new order no
     if (!$this->id) {
         $this->set('added', date("Y-m-d H:i:s"));
         $this->set('published', 1);
         $user = JFactory::GetUser();
         $this->set('author', $user->id);
     }
     return true;
 }
开发者ID:vstorm83,项目名称:propertease,代码行数:11,代码来源:announce.php

示例2: check

 function check()
 {
     // make published by default and get a new order no
     if (!$this->id) {
         $this->set('created', date("Y-m-d H:i:s"));
         $this->set('ordering', $this->getNextOrder());
         $this->set('published', 1);
         $user = JFactory::GetUser();
         $this->set('author', $user->id);
     }
     $this->set('modified', date("Y-m-d H:i:s"));
     return true;
 }
开发者ID:vstorm83,项目名称:propertease,代码行数:13,代码来源:kbart.php

示例3: check

 function check()
 {
     // make published by default and get a new order no
     if (!$this->id) {
         $this->set('ordering', $this->getNextOrder());
         $this->set('published', 1);
         $user = JFactory::GetUser();
         $this->set('author', $user->id);
     }
     if (!$this->question) {
         return false;
     }
     return true;
 }
开发者ID:vstorm83,项目名称:propertease,代码行数:14,代码来源:faq.php

示例4: attachDownload

 static function attachDownload($ticketid, $fileid, $for_user = false)
 {
     $ticket = new SupportTicket();
     if ($ticket->load($ticketid, $for_user)) {
         $attach = $ticket->getAttach($fileid);
         if (substr($attach->diskfile, 0, 7) == "http://" || substr($attach->diskfile, 0, 8) == "https://") {
             header('Location: ' . $attach->diskfile);
             exit;
         }
         $file = JPATH_SITE . DS . FSS_Settings::get('attach_location') . DS . "support" . DS . $attach->diskfile;
         $display_filename = FSS_Helper::basename($attach->filename);
         if (!$for_user) {
             $user = JFactory::GetUser($attach->user_id);
             $type = FSS_Settings::get('support_filename');
             switch ($type) {
                 case 1:
                     $display_filename = $user->username . "_" . $display_filename;
                     break;
                 case 2:
                     $display_filename = $user->username . "_" . date("Y-m-d") . "_" . $display_filename;
                     break;
                 case 3:
                     $display_filename = date("Y-m-d") . "_" . $user->username . "_" . $display_filename;
                     break;
                 case 4:
                     $display_filename = date("Y-m-d") . "_" . $display_filename;
                     break;
             }
         }
         require_once JPATH_SITE . DS . 'components' . DS . 'com_fss' . DS . 'helper' . DS . 'files.php';
         FSS_File_Helper::DownloadFile($file, $display_filename);
     }
     exit;
 }
开发者ID:vstorm83,项目名称:propertease,代码行数:34,代码来源:support_helper.php


注:本文中的JFactory::GetUser方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。