本文整理匯總了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;
}