public ActionResult Index() { var userView = SetUserInfo.UserInfoSetting(UserManager.Users.ToList()); //return View(await UserManager.Users.ToListAsync()); return(View(userView)); }
/// <summary> /// Call this method to update your user settings on the server. You can /// update your nick, icon number, and ignore flags. For ignoring, you /// can either ignore Private Messages or Private Chats, or both. When /// ignoring such private requests, you can also optionally specify an /// automatic ignore response, which is handled by the server. /// </summary> /// <param name="newNick">Your new nick</param> /// <param name="newIcon">Your new icon number</param> /// <param name="ignorePrivMsgs">If true, ignore PM's</param> /// <param name="ignorePrivChat">If true, ignore PC's</param> /// <param name="autoIgnoreMsg"> /// If provided, send this message to the requestor on your behalf when a request is ignored. /// </param> public Status SetUserInfo(User newUserInfo) { if (m_server == null || m_server.IsConnected == false) { string message = "Cannot set user info: not connected to server."; s_log.ErrorFormat(message); return Status.GetFailure(message); } string error; if (newUserInfo.IsValid(out error) == false) { string message = String.Format("Cannot set user info: {0}.", error); s_log.ErrorFormat(message); return Status.GetFailure(message); } // If not ignoring anything, don't send an ignore message. if (newUserInfo.IgnorePrivateMsgs == false && newUserInfo.IgnorePrivateChat == false) { newUserInfo.IgnoreAutoResponse = null; } SetUserInfo setUserInfo = new SetUserInfo( newUserInfo.Username, newUserInfo.IconId, newUserInfo.IgnorePrivateMsgs, newUserInfo.IgnorePrivateChat, newUserInfo.IgnoreAutoResponse); Status result = m_server.SendTransaction(setUserInfo); // Update the local values, since the server doesn't come back with a response. if (result == Status.Success) m_localUser = newUserInfo; return result; }