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


PHP Docebo::user方法代码示例

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


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

示例1: connectedToUser

 public function connectedToUser($network_code, $user_idst = false)
 {
     $res = false;
     $user_idst = $user_idst > 0 ? $user_idst : getLogUserId();
     if (!isset($this->_userinfo[$user_idst])) {
         $acl_man = Docebo::user()->getAclManager();
         $this->_userinfo[$user_idst] = $acl_man->getUser($user_idst, false);
     }
     switch ($network_code) {
         case 'twitter':
             $res = !empty($this->_userinfo[$user_idst][ACL_INFO_TWITTER_ID]);
             break;
         case 'linkedin':
             $res = !empty($this->_userinfo[$user_idst][ACL_INFO_LINKEDIN_ID]);
             break;
         case 'facebook':
             $res = !empty($this->_userinfo[$user_idst][ACL_INFO_FACEBOOK_ID]);
             break;
         case 'google':
             $res = !empty($this->_userinfo[$user_idst][ACL_INFO_GOOGLE_ID]);
             break;
         case 'google_apps':
             $res = true;
             break;
     }
     return $res;
 }
开发者ID:abhinay100,项目名称:forma_app,代码行数:27,代码来源:lib.social.php

示例2: __construct

 public function __construct($mvc_name)
 {
     parent::__construct($mvc_name);
     require_once _base_ . '/lib/lib.json.php';
     $this->json = new Services_JSON();
     $this->acl_man =& Docebo::user()->getAclManager();
 }
开发者ID:abhinay100,项目名称:forma_app,代码行数:7,代码来源:EditionLmsController.php

示例3: getTemplate

/**
 * @return string the actual template name
 */
function getTemplate()
{
    // If saved in session use this one
    if (isset($_SESSION['template']) && $_SESSION['template'] != false) {
        return $_SESSION['template'];
    }
    //search for a template associated to the current host
    $plat_templ = parseTemplateDomain($_SERVER['HTTP_HOST']);
    if ($plat_templ != false) {
        $_SESSION['template'] = $plat_templ;
        return $plat_templ;
    }
    // search template according to the org_chart_tree option
    if (!Docebo::user()->isAnonymous()) {
        $qtxt = "SELECT associated_template FROM\r\n\t\t\t%adm_org_chart_tree\r\n\t\t\tWHERE associated_template IS NOT NULL AND\r\n\t\t\tidst_oc IN (" . implode(',', Docebo::user()->getArrSt()) . ")\r\n\t\t\tORDER BY iLeft DESC\r\n\t\t\tLIMIT 0,1";
        $re = sql_query($qtxt);
        if (mysql_num_rows($re) > 0) {
            list($template_code) = sql_fetch_row($re);
            setTemplate($template_code);
            return $_SESSION['template'];
        }
    }
    // search for the default template
    $_SESSION['template'] = getDefaultTemplate();
    return $_SESSION['template'];
}
开发者ID:abhinay100,项目名称:forma_app,代码行数:29,代码来源:lib.template.php

示例4: drawCalendar

function drawCalendar()
{
    checkPerm('view');
    $size = importVar('size', false, 'max');
    $width = "90%";
    if ($size == "min") {
        $width = "200px";
    }
    addCss('calendar_' . $size);
    YuiLib::load('base,dragdrop');
    Util::get_js(Get::rel_path('lms') . '/modules/calendar/calendar.js', true, true);
    Util::get_js(Get::rel_path('lms') . '/modules/calendar/calendar_helper.js', true, true);
    //permissions = permissions granted to the logged user according to his/her level and role
    //	2 => can create/delete/modify all events
    //	1 => can create/delete/modify only own events
    //	0 => can view only
    $permissions = 0;
    if (checkPerm('mod', true)) {
        $permissions = 2;
    } elseif (checkPerm('personal', true)) {
        $permissions = 1;
    }
    //mode="edit" => events can be added and edited according to given permissions
    //mode="view" => events can only be viewed regardless the permissions
    $GLOBALS['page']->add('<script type="text/javascript">' . '	setup_cal(	null, ' . '\'lms\', ' . '\'lms\', ' . '\'edit\', ' . '\'' . $permissions . '\', ' . '\'' . Docebo::user()->getIdSt() . '\' ' . ');' . '</script>', 'page_head');
    $GLOBALS['page']->add("\n" . getTitleArea(Lang::t('_CALENDAR', 'calendar'), 'calendar') . '<div class="std_block">' . '<div id="displayCalendar" style="clear: both; width:' . $width . '"></div>' . '<div class="nofloat"></div>' . '</div>', 'content');
}
开发者ID:abhinay100,项目名称:forma_app,代码行数:27,代码来源:calendar.php

示例5: authenticateUser

 public function authenticateUser($username, $password)
 {
     $acl_man = Docebo::user()->getAclManager();
     $query = "SELECT * FROM %adm_user " . "WHERE userid='" . $this->aclManager->absoluteId($username) . "' AND pass='" . $this->aclManager->encrypt($password) . "'";
     $res = $this->db->query($query);
     return $this->db->num_rows($res) > 0;
 }
开发者ID:abhinay100,项目名称:forma_app,代码行数:7,代码来源:lib.api.php

示例6: assignVar

 function assignVar()
 {
     $this->id = importVar("id");
     $this->calEventClass = importVar("calEventClass");
     $this->start_year = importVar("start_year");
     $this->start_month = importVar("start_month");
     $this->start_day = importVar("start_day");
     $this->_year = $this->start_year;
     $this->_month = $this->start_month;
     $this->_day = $this->start_day;
     $this->start_hour = importVar("start_hour");
     $this->start_min = importVar("start_min");
     $this->start_sec = importVar("start_sec");
     $this->end_year = importVar("end_year");
     $this->end_month = importVar("end_month");
     $this->end_day = importVar("end_day");
     $this->end_hour = importVar("end_hour");
     $this->end_min = importVar("end_min");
     $this->end_sec = importVar("end_sec");
     $this->title = importVar("title");
     $this->description = importVar("description");
     $this->_owner = importVar("_owner");
     if (!$this->_owner) {
         $this->_owner == Docebo::user()->getIdSt();
     }
     $this->category = importVar("category");
     $this->private = importVar("private");
 }
开发者ID:abhinay100,项目名称:forma_app,代码行数:28,代码来源:lib.calevent_core.php

示例7: init

 public function init()
 {
     YuiLib::load('base,tabview');
     Lang::init('course');
     $this->model = new VideoconferenceLms(Docebo::user()->getIdSt());
     $upd = new UpdatesLms();
     $this->info = $upd->videoconferenceCounterUpdates();
 }
开发者ID:abhinay100,项目名称:forma_app,代码行数:8,代码来源:VideoconferenceLmsController.php

示例8: logout

 /**
  * Return the link for the logout
  * @return <type>
  */
 public static function logout()
 {
     $res = "";
     if (!Docebo::user()->isAnonymous()) {
         $res .= '<a href="index.php?action=logout">' . Get::img('standard/exit.png', Lang::t('_LOG_LOGOUT')) . Lang::t('_LOG_LOGOUT') . '</a>';
     }
     return $res;
 }
开发者ID:abhinay100,项目名称:forma_app,代码行数:12,代码来源:lib.cmslayout.php

示例9: init

 public function init()
 {
     parent::init();
     require_once _base_ . '/lib/lib.json.php';
     $this->model = new AdminrulesAdm();
     $this->json = new Services_JSON();
     $this->acl_man =& Docebo::user()->getAclManager();
 }
开发者ID:abhinay100,项目名称:forma_app,代码行数:8,代码来源:AdminrulesAdmController.php

示例10: __construct

 public function __construct()
 {
     require_once _base_ . '/lib/lib.preference.php';
     $this->preference = new AdminPreference();
     $this->acl_man =& Docebo::user()->getAclManager();
     $this->rules_path = '/framework/adminrules/';
     $this->rules_cache = NULL;
 }
开发者ID:abhinay100,项目名称:forma_app,代码行数:8,代码来源:AdminrulesAdm.php

示例11: __construct

 public function __construct()
 {
     require_once _base_ . '/lib/lib.preference.php';
     $this->preference = new AdminPreference();
     $this->acl_man =& Docebo::user()->getAclManager();
     list($idst) = each($this->acl_man->getGroupsIdstFromBasePath('/framework/level/admin'));
     $this->idst_admin_group = $idst;
     $this->model_adminrules = new AdminrulesAdm();
 }
开发者ID:abhinay100,项目名称:forma_app,代码行数:9,代码来源:AdminmanagerAdm.php

示例12: init

 public function init()
 {
     parent::init();
     require_once _base_ . '/lib/lib.json.php';
     $this->json = new Services_JSON();
     $this->acl_man =& Docebo::user()->getAclManager();
     $this->model = new LabelAlms();
     $this->permissions = array('view' => checkPerm('view', true, 'label', 'lms'), 'add' => true, 'mod' => true, 'del' => true);
 }
开发者ID:abhinay100,项目名称:forma_app,代码行数:9,代码来源:LabelAlmsController.php

示例13: sl_sal_getUserName

function sl_sal_getUserName()
{
    /*$dbconn = $GLOBALS['dbConn'];
    	$result = sql_query("SELECT surname,name FROM ".$GLOBALS['prefix_lms']."_user WHERE idUser=".$_SESSION['sesUser']."");
    	list($surname, $name) = mysql_fetch_array($result);*/
    $aclManager = Docebo::user()->getACLManager();
    $arr_result = $aclManager->getUser(Docebo::user()->getIdSt(), FALSE);
    return $arr_result[ACL_INFO_LASTNAME] . ',' . $arr_result[ACL_INFO_FIRSTNAME];
}
开发者ID:abhinay100,项目名称:forma_app,代码行数:9,代码来源:config.scorm.php

示例14: __construct

 public function __construct($id_course = 0, $id_edition = 0)
 {
     require_once _lms_ . '/lib/lib.edition.php';
     require_once _lms_ . '/lib/lib.course.php';
     $this->edition_man = new EditionManager();
     $this->course_man = new Man_Course();
     $this->acl_man =& Docebo::user()->getAclManager();
     $this->id_course = $id_course;
     $this->id_edition = $id_edition;
 }
开发者ID:abhinay100,项目名称:forma_app,代码行数:10,代码来源:EditionAlms.php

示例15: init

 public function init()
 {
     require_once _base_ . '/lib/lib.json.php';
     $this->db = DbConn::getInstance();
     $this->model = new MessageLms();
     $this->json = new Services_JSON();
     $this->aclManager = Docebo::user()->getAClManager();
     $this->can_send = true;
     //checkPerm('send_all', true) || checkPerm('send_upper', true);
 }
开发者ID:abhinay100,项目名称:forma_app,代码行数:10,代码来源:MessageLmsController.php


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