当前位置: 首页>>代码示例>>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;未经允许,请勿转载。