public UserInfo GetUser(int id, Guid ticket)
        {
            UserInfo getUser;

            try
            {
                _loginQuery.IsAuthenticated(ticket);
                _sessionGenerator.ProlongSession(ticket);

                getUser = _userQuery.GetById(id);
            }
            catch (SecurityException e)
            {
                throw new FaultException(e.Message);
            }
            catch (Exception e)
            {
                throw new FaultException(e.Message);
            }

            return(getUser);
        }
Example #2
0
 public Result <UserItem> Get(int id)
 {
     return(_repositoryQuery.GetById(id));
 }
Example #3
0
        public async Task <User> GetById(string id)
        {
            var result = await _userQuery.GetById(id);

            return(result);
        }