本文整理汇总了PHP中eZUserSetting::removeByUserID方法的典型用法代码示例。如果您正苦于以下问题:PHP eZUserSetting::removeByUserID方法的具体用法?PHP eZUserSetting::removeByUserID怎么用?PHP eZUserSetting::removeByUserID使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类eZUserSetting
的用法示例。
在下文中一共展示了eZUserSetting::removeByUserID方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: removeUser
static function removeUser($userID)
{
$user = eZUser::fetch($userID);
if (!$user) {
eZDebug::writeError("unable to find user with ID {$userID}", __METHOD__);
return false;
}
eZUser::removeSessionData($userID);
eZSubtreeNotificationRule::removeByUserID($userID);
eZCollaborationNotificationRule::removeByUserID($userID);
eZUserSetting::removeByUserID($userID);
eZUserAccountKey::removeByUserID($userID);
eZForgotPassword::removeByUserID($userID);
eZWishList::removeByUserID($userID);
eZGeneralDigestUserSettings::removeByUserId($userID);
eZPersistentObject::removeObject(eZUser::definition(), array('contentobject_id' => $userID));
return true;
}
示例2: removeUser
static function removeUser($userID)
{
$user = eZUser::fetch($userID);
if (!$user) {
eZDebug::writeError("unable to find user with ID {$userID}", __METHOD__);
return false;
}
eZUser::removeSessionData($userID);
eZSubtreeNotificationRule::removeByUserID($userID);
eZCollaborationNotificationRule::removeByUserID($userID);
eZUserSetting::removeByUserID($userID);
eZUserAccountKey::removeByUserID($userID);
eZForgotPassword::removeByUserID($userID);
eZWishList::removeByUserID($userID);
// only remove general digest setting if there are no other users with the same e-mail
$email = $user->attribute('email');
$usersWithEmailCount = eZPersistentObject::count(eZUser::definition(), array('email' => $email));
if ($usersWithEmailCount == 1) {
eZGeneralDigestUserSettings::removeByAddress($email);
}
eZPersistentObject::removeObject(eZUser::definition(), array('contentobject_id' => $userID));
return true;
}