本文整理汇总了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;
}
示例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();
}
示例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'];
}
示例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');
}
示例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;
}
示例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");
}
示例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();
}
示例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;
}
示例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();
}
示例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;
}
示例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();
}
示例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);
}
示例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];
}
示例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;
}
示例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);
}