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