本文整理汇总了PHP中xoops_notification_deletebyuser函数的典型用法代码示例。如果您正苦于以下问题:PHP xoops_notification_deletebyuser函数的具体用法?PHP xoops_notification_deletebyuser怎么用?PHP xoops_notification_deletebyuser使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了xoops_notification_deletebyuser函数的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: resign
function resign(&$flag, &$controller, &$xoopsUser)
{
$handler =& xoops_gethandler('member');
$groups = $handler->getGroupsByUser($xoopsUser->get('uid'));
foreach ($groups as $group) {
$handler->removeUserFromGroup($group, $xoopsUser->get('uid'));
}
$handler->addUserToGroup(RESIGN_USER_GROUP_ID, $xoopsUser->get('uid'));
xoops_notification_deletebyuser($xoopsUser->get('uid'));
XCube_DelegateUtils::call('Legacy.Event.UserDelete', new XCube_Ref($xoopsUser));
$flag = true;
$root =& XCube_Root::getSingleton();
// Reset session
$_SESSION = array();
$root->mSession->destroy(true);
// reset online
$handler =& xoops_gethandler('online');
$handler->destroy($xoopsUser->get('uid'));
xoops_notification_deletebyuser($xoopsUser->get('uid'));
// Redirect not to call behind delegates.
$langMgr =& $root->getLanguageManager();
$langMgr->loadPageTypeMessageCatalog('user');
$controller =& $root->getController();
$controller->executeRedirect(XOOPS_URL, 3, _US_BEENDELED);
}
示例2: foreach
if (@isset($_REQUEST['memberslist_id']) || @$_REQUEST['memberslist_id'] != '') {
$xoBreadCrumb->render();
$error = '';
foreach ($_REQUEST['memberslist_id'] as $del) {
$del = intval($del);
$user =& $member_handler->getUser($del);
$groups = $user->getGroups();
if (in_array(XOOPS_GROUP_ADMIN, $groups)) {
$error .= sprintf(_AM_SYSTEM_USERS_NO_ADMINSUPP, $user->getVar("uname"));
} elseif (!$member_handler->deleteUser($user)) {
$error .= sprintf(_AM_SYSTEM_USERS_NO_SUPP, $user->getVar("uname"));
} else {
$online_handler =& xoops_gethandler('online');
$online_handler->destroy($del);
// RMV-NOTIFY
xoops_notification_deletebyuser($del);
}
}
if ($error != '') {
redirect_header("admin.php?fct=users", 3, sprintf(_AM_SYSTEM_USERS_ERROR, $error));
} else {
redirect_header("admin.php?fct=users", 1, _AM_SYSTEM_DBUPDATED);
}
}
break;
// Save user
// Save user
case "users_save":
global $xoopsConfig, $xoopsModule, $xoopsUser;
if (isset($_REQUEST['uid'])) {
//Update user
示例3: _doDelete
/**
* Exection deleting.
*
* @return bool
*/
function _doDelete(&$flag, $controller, $xoopsUser)
{
$handler =& xoops_gethandler('member');
if ($handler->deleteUser($xoopsUser)) {
$handler =& xoops_gethandler('online');
$handler->destroy($this->mObject->get('uid'));
xoops_notification_deletebyuser($this->mObject->get('uid'));
$flag = true;
}
$flag |= false;
}
示例4: delete_users
function delete_users()
{
global $xoopsSecurity;
if (!$xoopsSecurity->check()) {
redirectMsg("users.php", implode('<br />', $GLOBALS['xoopsSecurity']->getErrors()), 1);
die;
}
foreach ($_GET as $k => $v) {
if ($k == 'XOOPS_TOKEN_REQUEST' || $k == 'action') {
continue;
}
$q .= $q == '' ? "{$k}=" . urlencode($v) : "&{$k}=" . urlencode($v);
}
$uid = rmc_server_var($_POST, 'ids', array());
$member_handler =& xoops_gethandler('member', 'system');
foreach ($uid as $id) {
$user =& $member_handler->getUser($id);
$groups = $user->getGroups();
if (in_array(XOOPS_GROUP_ADMIN, $groups)) {
xoops_error(sprintf(__('Admin user cannot be deleted: %s', 'rmcommon'), $user->getVar("uname") . '<br />'));
} elseif (!$member_handler->deleteUser($user)) {
xoops_error(sprintf(__('User cannot be deleted: %s', 'rmcommon'), $user->getVar("uname") . '<br />'));
} else {
$online_handler =& xoops_gethandler('online');
$online_handler->destroy($uid);
// RMV-NOTIFY
xoops_notification_deletebyuser($uid);
}
}
redirectMsg("users.php?" . $q, __('Users deleted successfully!', 'rmcommon'), 0);
}