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


PHP CKunenaTools::updateNameInfo方法代码示例

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


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

示例1: browseUploaded

 case "browseFiles":
     browseUploaded($kunena_db, $option, 0);
     break;
 case "replaceImage":
     replaceImage($kunena_db, $option, JRequest::getVar('img', ''), JRequest::getInt('OxP', 1));
     break;
 case "deleteFile":
     deleteFile($kunena_db, $option, JRequest::getVar('fileName', ''));
     break;
 case "showAdministration":
     showAdministration($option);
     break;
 case 'recount':
     CKunenaTools::reCountBoards();
     // Also reset the name info stored with messages
     CKunenaTools::updateNameInfo();
     $app->redirect(JURI::base() . 'index2.php?option=com_kunena', _KUNENA_RECOUNTFORUMS_DONE);
     break;
 case "showsmilies":
     showsmilies($option);
     break;
 case "editsmiley":
     editsmiley($option, $cid[0]);
     break;
 case "savesmiley":
     savesmiley($option, $id);
     break;
 case "deletesmiley":
     deletesmiley($option, $cid);
     break;
 case "newsmiley":
开发者ID:kaantunc,项目名称:MYK-BOR,代码行数:31,代码来源:admin.kunena.php

示例2: douserssync

function douserssync($kunena_db, $option)
{
    $usercache = JRequest::getBool('usercache', 0);
    $useradd = JRequest::getBool('useradd', 0);
    $userdel = JRequest::getBool('userdel', 0);
    $userrename = JRequest::getBool('userrename', 0);
    $kunena_app =& JFactory::getApplication();
    $kunena_db =& JFactory::getDBO();
    if (!JRequest::checkToken()) {
        $kunena_app->enqueueMessage(JText::_('COM_KUNENA_ERROR_TOKEN'), 'error');
        while (@ob_end_clean()) {
        }
        $kunena_app->redirect(JURI::base() . "index.php?option={$option}&task=syncusers");
        return;
    }
    if ($usercache) {
        //reset access rights
        $kunena_db->setQuery("UPDATE #__kunena_sessions SET allowed='na'");
        $kunena_db->query();
        if (KunenaError::checkDatabaseError()) {
            return;
        }
        $kunena_app->enqueueMessage(JText::_('COM_KUNENA_SYNC_USERS_DO_CACHE'));
    }
    if ($useradd) {
        $kunena_db->setQuery("INSERT INTO #__kunena_users (userid) SELECT a.id FROM #__users AS a LEFT JOIN #__kunena_users AS b ON b.userid=a.id WHERE b.userid IS NULL");
        $kunena_db->query();
        if (KunenaError::checkDatabaseError()) {
            return;
        }
        $kunena_app->enqueueMessage(JText::_('COM_KUNENA_SYNC_USERS_DO_ADD') . ' ' . $kunena_db->getAffectedRows());
    }
    if ($userdel) {
        $kunena_db->setQuery("DELETE a FROM #__kunena_users AS a LEFT JOIN #__users AS b ON a.userid=b.id WHERE b.username IS NULL");
        $kunena_db->query();
        if (KunenaError::checkDatabaseError()) {
            return;
        }
        $kunena_app->enqueueMessage(JText::_('COM_KUNENA_SYNC_USERS_DO_DEL') . ' ' . $kunena_db->getAffectedRows());
    }
    if ($userrename) {
        $cnt = CKunenaTools::updateNameInfo();
        $kunena_app->enqueueMessage(JText::_('COM_KUNENA_SYNC_USERS_DO_RENAME') . " {$cnt}");
    }
    while (@ob_end_clean()) {
    }
    $kunena_app->redirect(JURI::base() . "index.php?option={$option}&task=syncusers");
}
开发者ID:vuchannguyen,项目名称:hoctap,代码行数:48,代码来源:admin.kunena.php

示例3: douserssync

function douserssync($kunena_db, $option)
{
    $usercache = JRequest::getBool('usercache', 0);
    $useradd = JRequest::getBool('useradd', 0);
    $userdel = JRequest::getBool('userdel', 0);
    $userrename = JRequest::getBool('userrename', 0);
    $app =& JFactory::getApplication();
    $kunena_db =& JFactory::getDBO();
    if ($usercache) {
        //reset access rights
        $kunena_db->setQuery("UPDATE #__fb_sessions SET allowed='na'");
        $kunena_db->query();
        check_dberror("Unable to update sessions.");
        $app->enqueueMessage(_KUNENA_SYNC_USERS_DO_CACHE);
    }
    if ($useradd) {
        $kunena_db->setQuery("INSERT INTO #__fb_users (userid) SELECT a.id FROM #__users AS a LEFT JOIN #__fb_users AS b ON b.userid=a.id WHERE b.userid IS NULL");
        $kunena_db->query();
        check_dberror('Unable to create user profiles.');
        $app->enqueueMessage(_KUNENA_SYNC_USERS_DO_ADD . ' ' . $kunena_db->getAffectedRows());
    }
    if ($userdel) {
        $kunena_db->setQuery("DELETE a FROM #__fb_users AS a LEFT JOIN #__users AS b ON a.userid=b.id WHERE b.username IS NULL");
        $kunena_db->query();
        check_dberror("Unable to delete user profiles.");
        $app->enqueueMessage(_KUNENA_SYNC_USERS_DO_DEL . ' ' . $kunena_db->getAffectedRows());
    }
    if ($userrename) {
        $cnt = CKunenaTools::updateNameInfo();
        $app->enqueueMessage(_KUNENA_SYNC_USERS_DO_RENAME . " {$cnt}");
    }
    $app->redirect(JURI::base() . "index.php?option={$option}&task=syncusers");
}
开发者ID:kaantunc,项目名称:MYK-BOR,代码行数:33,代码来源:admin.kunena.php


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