本文整理汇总了PHP中UserProfile::getUserInfo方法的典型用法代码示例。如果您正苦于以下问题:PHP UserProfile::getUserInfo方法的具体用法?PHP UserProfile::getUserInfo怎么用?PHP UserProfile::getUserInfo使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类UserProfile
的用法示例。
在下文中一共展示了UserProfile::getUserInfo方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: searchUser
function searchUser(&$url)
{
checkPerm('view');
require_once _base_ . '/lib/lib.form.php';
require_once $GLOBALS['where_framework'] . '/lib/lib.myfriends.php';
$lang =& DoceboLanguage::createInstance('myfriends', 'lms');
$my_fr = new MyFriends(getLogUserId());
$acl_man =& Docebo::user()->getAclManager();
$GLOBALS['page']->add(getTitleArea(array($url->getUrl() => $lang->def('_MY_FRIENDS'), $lang->def('_SEARCH_USER')), 'myfriends') . '<div class="std_block">', 'content');
if (isset($_POST['send'])) {
if ($my_fr->addFriend($_POST['id_friend'], MF_WAITING, $_POST['request'])) {
Util::jump_to($url->getUrl('result=ok_del'));
}
$GLOBALS['page']->add(getErrorUi($lang->def('_ERR_REMOVE_FRIEND')));
} elseif (isset($_GET['id_friend'])) {
$GLOBALS['page']->add(Form::openForm('send_request', $url->getUrl('op=searchuser')) . Form::getHidden('id_friend', 'id_friend', $_GET['id_friend']) . Form::openElementSpace() . Form::getTextarea($lang->def('_REQUEST_MESSAGE'), 'request', 'request') . Form::closeElementSpace() . Form::openButtonSpace() . Form::getButton('send', 'send', $lang->def('_SEND_REQUEST')) . Form::getButton('back_search', 'back_search', $lang->def('_UNDO')) . Form::closeButtonSpace() . Form::closeForm() . '</div>', 'content');
return;
}
$GLOBALS['page']->add(Form::openForm('', $url->getUrl('op=searchuser')) . Form::getOpenFieldset($lang->def('_SEARCH_USER')) . Form::getTextfield($lang->def('_SEARCH_USERNAME'), 'username', 'username', 255, importVar('username', false, '')) . Form::openButtonSpace() . Form::getButton('search', 'search', $lang->def('_SEARCH')) . Form::getButton('undo', 'undo', $lang->def('_UNDO')) . Form::closeButtonSpace() . Form::getCloseFieldset() . Form::closeForm(), 'content');
if (isset($_POST['username'])) {
$finded_user = $acl_man->getUser(false, $acl_man->absoluteId($_POST['username']));
if ($finded_user === false) {
$GLOBALS['page']->add($lang->def('_NO_USER_FINDED'), 'content');
} else {
require_once _base_ . '/lib/lib.user_profile.php';
if (getLogUserId() != $finded_user[ACL_INFO_IDST]) {
$GLOBALS['page']->add('<p class="confirm_friend">' . '<a href="' . $url->getUrl('op=searchuser&id_friend=' . $finded_user[ACL_INFO_IDST] . '') . '">' . $lang->def('_ADD_TO_MY_FIREND') . '</a>' . '</p>', 'content');
}
$profile = new UserProfile($finded_user[ACL_INFO_IDST]);
$profile->init('profile', 'framework', 'modname=myfriends&op=searchuser', 'ap');
$GLOBALS['page']->add($profile->getUserInfo(), 'content');
}
}
$GLOBALS['page']->add('</div>', 'content');
}
示例2: die
\ ======================================================================== */
/**
* @package course management
* @subpackage course catalogue
* @category ajax server
* @author Giovanni Derks
* @version $Id:$
*
*/
if (Docebo::user()->isAnonymous()) {
die('You can\'t access');
}
require_once $GLOBALS['where_framework'] . '/lib/lib.permission.php';
$op = Get::req('op', DOTY_ALPHANUM, '');
switch ($op) {
case "getuserprofile":
$lang =& DoceboLanguage::createInstance('standard', 'framework');
$lang->setGlobal();
require_once _base_ . '/lib/lib.user_profile.php';
$id_user = importVar('id_user', true, 0);
$profile = new UserProfile($id_user);
$profile->init('profile', 'framework', 'modname=directory&op=org_manageuser&id_user=' . $id_user, 'ap');
$profile->enableGodMode();
$profile->disableModViewerPolicy();
$value = array("content" => $profile->getUserInfo(), "id_user" => $id_user);
require_once _base_ . '/lib/lib.json.php';
$json = new Services_JSON();
$output = $json->encode($value);
aout($output);
break;
}