當前位置: 首頁>>代碼示例>>PHP>>正文


PHP erLhcoreClassUserDep::setHideOnlineStatus方法代碼示例

本文整理匯總了PHP中erLhcoreClassUserDep::setHideOnlineStatus方法的典型用法代碼示例。如果您正苦於以下問題:PHP erLhcoreClassUserDep::setHideOnlineStatus方法的具體用法?PHP erLhcoreClassUserDep::setHideOnlineStatus怎麽用?PHP erLhcoreClassUserDep::setHideOnlineStatus使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在erLhcoreClassUserDep的用法示例。


在下文中一共展示了erLhcoreClassUserDep::setHideOnlineStatus方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: array

         $response = erLhcoreClassChatEventDispatcher::getInstance()->dispatch('user.edit.photo_resize_150', array('mime_type' => $file["data"]['mime_type'], 'user' => $UserData));
         if ($response === false) {
             erLhcoreClassImageConverter::getInstance()->converter->transform('photow_150', $UserData->file_path_server, $UserData->file_path_server);
             chmod($UserData->file_path_server, 0644);
         }
     }
 }
 if (count($Errors) == 0) {
     // Update password if neccesary
     if ($form->hasInputField('Password') && $form->hasInputField('Password1') && $form->Password != '') {
         $UserData->setPassword($form->Password);
     }
     $UserData->email = $form->Email;
     $UserData->name = $form->Name;
     erLhcoreClassUser::getSession()->update($UserData);
     erLhcoreClassUserDep::setHideOnlineStatus($UserData);
     erLhcoreClassModelGroupUser::removeUserFromGroups($UserData->id);
     foreach ($UserData->user_groups_id as $group_id) {
         $groupUser = new erLhcoreClassModelGroupUser();
         $groupUser->group_id = $group_id;
         $groupUser->user_id = $UserData->id;
         $groupUser->saveThis();
     }
     $CacheManager = erConfigClassLhCacheConfig::getInstance();
     $CacheManager->expireCache();
     if (isset($_POST['Save_account'])) {
         erLhcoreClassModule::redirect('user/userlist');
         exit;
     } else {
         $tpl->set('updated', true);
     }
開發者ID:nagyistoce,項目名稱:livehelperchat,代碼行數:31,代碼來源:edit.php

示例2: handleOperatorPing

 /**
  * Handlers requests like
  *
  * May 08 23:02:11 [Warning] [default] [default] {"action":"ping","user":"remdex2@xmpp.livehelperchat.com/25304460891431118632139491"}
  * May 08 23:02:14 [Warning] [default] [default] {"action":"disconnect","user":"remdex2","server":"xmpp.livehelperchat.com"}
  * May 08 23:21:52 [Warning] [default] [default] {"action":"connect","user":"remdex2","server":"xmpp.livehelperchat.com"}
  */
 public static function handleOperatorPing($jsonContent)
 {
     $params = json_decode($jsonContent, true);
     $xmppService = erLhcoreClassModule::getExtensionInstance('erLhcoreClassExtensionXmppservice');
     // If ping just update last action
     if ($params['action'] == 'ping') {
         // Parse user parts
         $userParts = self::parseXMPPUser($params['user']);
         // Fetches user id by xmpp username
         $userId = self::getUserIDByXMPPUsername($userParts['xmppuser']);
         // Updates last activity
         if (is_numeric($userId)) {
             self::updateActivityByUserId($userId, time() + $xmppService->settings['append_time']);
         } else {
             throw new Exception("Could not find LHC user by user - " . $userParts['xmppuser']);
         }
     } elseif ($params['action'] == 'disconnect' || $params['action'] == 'connect') {
         // Fetches user id by xmpp username
         $userId = self::getUserIDByXMPPUsername($params['user'] . '@' . $params['server']);
         // Updates last activity to zero
         if (is_numeric($userId)) {
             self::updateActivityByUserId($userId, $params['action'] == 'connect' ? time() + $xmppService->settings['append_time'] : 0);
             if ($params['action'] == 'connect') {
                 $userData = erLhcoreClassModelUser::fetch($userId);
                 if ($userData instanceof erLhcoreClassModelUser && $userData->hide_online == 1) {
                     $userData->hide_online = 0;
                     erLhcoreClassUser::getSession()->update($userData);
                     erLhcoreClassUserDep::setHideOnlineStatus($userData);
                 }
             }
         } else {
             throw new Exception("Could not find LHC user by user - " . $params['user'] . '@' . $params['server']);
         }
     }
     return true;
 }
開發者ID:noikiy,項目名稱:xmpp-chat,代碼行數:43,代碼來源:erlhcoreclassxmppservicehandler.php


注:本文中的erLhcoreClassUserDep::setHideOnlineStatus方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。