gov.va.medora.mdws.UserLib.getUserSecurityKeys C# (CSharp) Method

getUserSecurityKeys() public method

public getUserSecurityKeys ( string uid ) : UserSecurityKeyArray
uid string
return gov.va.medora.mdws.dto.UserSecurityKeyArray
        public UserSecurityKeyArray getUserSecurityKeys(string uid)
        {
            UserSecurityKeyArray result = new UserSecurityKeyArray();

            if (!(MdwsUtils.isAuthorizedConnection(mySession) == "OK"))
            {
                result.fault = new FaultTO("Connections not ready for operation", "Need to login?");
            }
            else if (String.IsNullOrEmpty(uid))
            {
                result.fault = new FaultTO("Empty UID");
            }
            if (result.fault != null)
            {
                return result;
            }

            try
            {
                Dictionary<string, AbstractPermission> d = User.getPermissions(mySession.ConnectionSet.BaseConnection, uid, PermissionType.SecurityKey);
                result = new UserSecurityKeyArray(d);
            }
            catch (Exception exc)
            {
                result.fault = new FaultTO(exc);
            }
            return result;
        }