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


PHP PMF_User_CurrentUser::getUserData方法代码示例

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


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

示例1: sprintf

        $htmlAllCategories .= sprintf("<li>%s</li>\n", $path);
    }
    $htmlAllCategories .= '            </ul>';
    $htmlAllCategories .= '    </div>';
}
// Related FAQs
$faqSearchResult->reviewResultset($faqRelation->getAllRelatedById($faq->faqRecord['id'], $faq->faqRecord['title'], $faq->faqRecord['keywords']));
$relatedFaqs = PMF_Helper_Search::getInstance()->renderRelatedFaqs($faqSearchResult, $faq->faqRecord['id']);
// Show link to edit the faq?
$editThisEntry = '';
if (isset($permission['editbt']) && $permission['editbt']) {
    $editThisEntry = sprintf('<a href="%sadmin/index.php?action=editentry&amp;id=%d&amp;lang=%s">%s</a>', PMF_Link::getSystemRelativeUri('index.php'), $faq->faqRecord['id'], $lang, $PMF_LANG['ad_entry_edit_1'] . ' ' . $PMF_LANG['ad_entry_edit_2']);
}
// Is the faq expired?
$expired = date('YmdHis') > $faq->faqRecord['dateEnd'];
// Does the user have the right to add a comment?
if ($faq->faqRecord['active'] != 'yes' || 'n' == $faq->faqRecord['comment'] || $expired) {
    $commentMessage = $PMF_LANG['msgWriteNoComment'];
} else {
    $commentMessage = sprintf("%s<a href=\"javascript:void(0);\" onclick=\"javascript:\$('#commentForm').show();\">%s</a>", $PMF_LANG['msgYouCan'], $PMF_LANG['msgWriteComment']);
}
$translationUrl = sprintf(str_replace('%', '%%', PMF_Link::getSystemRelativeUri('index.php')) . 'index.php?%saction=translate&amp;cat=%s&amp;id=%d&amp;srclang=%s', $sids, $currentCategory, $faq->faqRecord['id'], $lang);
if (!empty($switchLanguage)) {
    $tpl->processBlock('writeContent', 'switchLanguage', array('msgChangeLanguage' => $PMF_LANG['msgLangaugeSubmit']));
}
if (isset($permission['addtranslation']) && $permission['addtranslation']) {
    $tpl->processBlock('writeContent', 'addTranslation', array('msgTranslate' => $PMF_LANG['msgTranslate']));
}
// Set the template variables
$tpl->processTemplate('writeContent', array('writeRubrik' => $categoryName, 'solution_id' => $faq->faqRecord['solution_id'], 'writeThema' => $question, 'writeArticleCategoryHeader' => $PMF_LANG['msgArticleCategories'], 'writeArticleCategories' => $htmlAllCategories, 'writeContent' => $answer, 'writeTagHeader' => $PMF_LANG['msg_tags'] . ': ', 'writeArticleTags' => $faqTagging->getAllLinkTagsById($faq->faqRecord['id']), 'writeRelatedArticlesHeader' => $PMF_LANG['msg_related_articles'] . ': ', 'writeRelatedArticles' => $relatedFaqs, 'writeDateMsg' => $PMF_LANG['msgLastUpdateArticle'] . PMF_Date::format($faq->faqRecord['date']), 'writeRevision' => $PMF_LANG['ad_entry_revision'] . ': 1.' . $faq->faqRecord['revision_id'], 'writeAuthor' => $PMF_LANG['msgAuthor'] . ': ' . $faq->faqRecord['author'], 'editThisEntry' => $editThisEntry, 'translationUrl' => $translationUrl, 'languageSelection' => PMF_Language::selectLanguages($LANGCODE, false, $arrLanguage, 'translation'), 'msgTranslateSubmit' => $PMF_LANG['msgTranslateSubmit'], 'saveVotingPATH' => sprintf(str_replace('%', '%%', PMF_Link::getSystemRelativeUri('index.php')) . 'index.php?%saction=savevoting', $sids), 'saveVotingID' => $faq->faqRecord['id'], 'saveVotingIP' => $_SERVER['REMOTE_ADDR'], 'msgAverageVote' => $PMF_LANG['msgAverageVote'], 'printVotings' => $faqRating->getVotingResult($recordId), 'switchLanguage' => $switchLanguage, 'msgVoteUseability' => $PMF_LANG['msgVoteUseability'], 'msgVoteBad' => $PMF_LANG['msgVoteBad'], 'msgVoteGood' => $PMF_LANG['msgVoteGood'], 'msgVoteSubmit' => $PMF_LANG['msgVoteSubmit'], 'writeCommentMsg' => $commentMessage, 'msgWriteComment' => $PMF_LANG['msgWriteComment'], 'id' => $faq->faqRecord['id'], 'lang' => $lang, 'msgCommentHeader' => $PMF_LANG['msgCommentHeader'], 'msgNewContentName' => $PMF_LANG['msgNewContentName'], 'msgNewContentMail' => $PMF_LANG['msgNewContentMail'], 'defaultContentMail' => $user instanceof PMF_User_CurrentUser ? $user->getUserData('email') : '', 'defaultContentName' => $user instanceof PMF_User_CurrentUser ? $user->getUserData('display_name') : '', 'msgYourComment' => $PMF_LANG['msgYourComment'], 'msgNewContentSubmit' => $PMF_LANG['msgNewContentSubmit'], 'captchaFieldset' => PMF_Helper_Captcha::getInstance()->renderCaptcha($captcha, 'writecomment', $PMF_LANG['msgCaptcha']), 'writeComments' => $faqComment->getComments($faq->faqRecord['id'], PMF_Comment::COMMENT_TYPE_FAQ), 'msg_about_faq' => $PMF_LANG['msg_about_faq']));
$tpl->includeTemplate('writeContent', 'index');
开发者ID:atlcurling,项目名称:tkt,代码行数:31,代码来源:artikel.php

示例2: array

}
//
// Initalizing static string wrapper
//
PMF_String::init($LANGCODE);
/* header of the admin page */
require 'header.php';
$action = PMF_Filter::filterInput(INPUT_GET, 'action', FILTER_SANITIZE_STRING);
$message = '';
if ($action == "sendmail") {
    $username = PMF_Filter::filterInput(INPUT_POST, 'username', FILTER_SANITIZE_STRING);
    $email = PMF_Filter::filterInput(INPUT_POST, 'email', FILTER_VALIDATE_EMAIL);
    if (!is_null($username) && !is_null($email)) {
        $user = new PMF_User_CurrentUser();
        $loginExist = $user->getUserByLogin($username);
        if ($loginExist && $email == $user->getUserData('email')) {
            $consonants = array('b', 'c', 'd', 'f', 'g', 'h', 'j', 'k', 'l', 'm', 'n', 'p', 'r', 's', 't', 'v', 'w', 'x', 'y', 'z');
            $vowels = array('a', 'e', 'i', 'o', 'u');
            $newPassword = '';
            srand((double) microtime() * 1000000);
            for ($i = 1; $i <= 4; $i++) {
                $newPassword .= $consonants[rand(0, 19)];
                $newPassword .= $vowels[rand(0, 4)];
            }
            $user->changePassword($newPassword);
            $text = $PMF_LANG['lostpwd_text_1'] . "\nUsername: " . $username . "\nNew Password: " . $newPassword . "\n\n" . $PMF_LANG["lostpwd_text_2"];
            $mail = new PMF_Mail();
            $mail->addTo($email);
            $mail->subject = '[%sitename%] Username / password request';
            $mail->message = $text;
            $result = $mail->send();
开发者ID:atlcurling,项目名称:tkt,代码行数:31,代码来源:password.php

示例3: sprintf

if ($user->perm->checkRight($user->getUserId(), 'editbt')) {
    $editThisEntry = sprintf('<a href="%sadmin/index.php?action=editentry&amp;id=%d&amp;lang=%s">%s</a>', PMF_Link::getSystemRelativeUri('index.php'), $recordId, $lang, $PMF_LANG['ad_entry_edit_1'] . ' ' . $PMF_LANG['ad_entry_edit_2']);
}
// Is the faq expired?
$expired = date('YmdHis') > $faq->faqRecord['dateEnd'];
// Does the user have the right to add a comment?
if (-1 === $user->getUserId() && !$faqConfig->get('records.allowCommentsForGuests') || $faq->faqRecord['active'] === 'no' || 'n' == $faq->faqRecord['comment'] || $expired) {
    $commentMessage = $PMF_LANG['msgWriteNoComment'];
} else {
    $commentMessage = sprintf("%s<a href=\"javascript:void(0);\" onclick=\"javascript:\$('#commentForm').show();\">%s</a>", $PMF_LANG['msgYouCan'], $PMF_LANG['msgWriteComment']);
}
$translationUrl = sprintf(str_replace('%', '%%', PMF_Link::getSystemRelativeUri('index.php')) . 'index.php?%saction=translate&amp;cat=%s&amp;id=%d&amp;srclang=%s', $sids, $currentCategory, $recordId, $lang);
if (!empty($switchLanguage)) {
    $tpl->parseBlock('writeContent', 'switchLanguage', array('msgChangeLanguage' => $PMF_LANG['msgLangaugeSubmit']));
}
if ($user->perm->checkRight($user->getUserId(), 'addtranslation')) {
    $tpl->parseBlock('writeContent', 'addTranslation', array('msgTranslate' => $PMF_LANG['msgTranslate']));
}
if ('-' !== $faqTagging->getAllLinkTagsById($recordId)) {
    $tpl->parseBlock('writeContent', 'tagsAvailable', array('renderTags' => $PMF_LANG['msg_tags'] . ': ' . $faqTagging->getAllLinkTagsById($recordId)));
}
if ('' !== $htmlAllCategories) {
    $tpl->parseBlock('writeContent', 'relatedCategories', array('renderRelatedCategoriesHeader' => $PMF_LANG['msgArticleCategories'], 'renderRelatedCategories' => $htmlAllCategories));
}
if ('' !== $relatedFaqs) {
    $tpl->parseBlock('writeContent', 'relatedFaqs', array('renderRelatedArticlesHeader' => $PMF_LANG['msg_related_articles'], 'renderRelatedArticles' => $relatedFaqs));
}
$date = new PMF_Date($faqConfig);
$captchaHelper = new PMF_Helper_Captcha($faqConfig);
$tpl->parse('writeContent', array('baseHref' => $faqSystem->getSystemUri($faqConfig), 'writeRubrik' => $categoryName, 'solution_id' => $faq->faqRecord['solution_id'], 'solution_id_link' => PMF_Link::getSystemRelativeUri() . '?solution_id=' . $faq->faqRecord['solution_id'], 'writeThema' => $question, 'writeContent' => $answer, 'writeDateMsg' => '<dt>' . $PMF_LANG['msgLastUpdateArticle'] . '</dt><dd>' . $date->format($faq->faqRecord['date']) . '</dd>', 'writeRevision' => '<dt>' . $PMF_LANG['ad_entry_revision'] . ':</dt><dd>1.' . $faq->faqRecord['revision_id'] . '</dd>', 'writeAuthor' => '<dt>' . $PMF_LANG['msgAuthor'] . ':</dt><dd>' . $faq->faqRecord['author'] . '</dd>', 'editThisEntry' => $editThisEntry, 'translationUrl' => $translationUrl, 'languageSelection' => PMF_Language::selectLanguages($LANGCODE, false, $arrLanguage, 'translation'), 'msgTranslateSubmit' => $PMF_LANG['msgTranslateSubmit'], 'saveVotingPATH' => sprintf(str_replace('%', '%%', PMF_Link::getSystemRelativeUri('index.php')) . 'index.php?%saction=savevoting', $sids), 'saveVotingID' => $recordId, 'saveVotingIP' => $_SERVER['REMOTE_ADDR'], 'msgAverageVote' => $PMF_LANG['msgAverageVote'], 'renderVotingStars' => '', 'printVotings' => $faqRating->getVotingResult($recordId), 'switchLanguage' => $switchLanguage, 'msgVoteUseability' => $PMF_LANG['msgVoteUseability'], 'msgVoteBad' => $PMF_LANG['msgVoteBad'], 'msgVoteGood' => $PMF_LANG['msgVoteGood'], 'msgVoteSubmit' => $PMF_LANG['msgVoteSubmit'], 'writeCommentMsg' => $commentMessage, 'msgWriteComment' => $PMF_LANG['msgWriteComment'], 'id' => $recordId, 'lang' => $lang, 'msgCommentHeader' => $PMF_LANG['msgCommentHeader'], 'msgNewContentName' => $PMF_LANG['msgNewContentName'], 'msgNewContentMail' => $PMF_LANG['msgNewContentMail'], 'defaultContentMail' => $user instanceof PMF_User_CurrentUser ? $user->getUserData('email') : '', 'defaultContentName' => $user instanceof PMF_User_CurrentUser ? $user->getUserData('display_name') : '', 'msgYourComment' => $PMF_LANG['msgYourComment'], 'msgNewContentSubmit' => $PMF_LANG['msgNewContentSubmit'], 'captchaFieldset' => $captchaHelper->renderCaptcha($captcha, 'writecomment', $PMF_LANG['msgCaptcha'], $auth), 'writeComments' => $faqComment->getComments($recordId, PMF_Comment::COMMENT_TYPE_FAQ), 'msg_about_faq' => $PMF_LANG['msg_about_faq']));
$tpl->merge('writeContent', 'index');
开发者ID:ae120,项目名称:phpMyFAQ,代码行数:31,代码来源:artikel.php


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