Inheritance: ISSOUser
示例#1
0
文件: Users.cs 项目: Jaryli/SSO.NET
 public ISSOUser GetUser(string uid)
 {
     XmlElement documentElement = this.doc.DocumentElement;
     string xpath = string.Format("user[@uid='{0}']", uid);
     XmlNode node = documentElement.SelectSingleNode(xpath);
     if (node == null)
     {
         return null;
     }
     XmlAttribute attribute = node.Attributes["pwd"];
     var user = new SSOUser();
     user.Uid = uid;
     user.Password = attribute.Value;
     return user;
 }
示例#2
0
文件: Users.cs 项目: itpleb/ZX.Auth
        public ISSOUser GetUser(string uid)
        {
            XmlElement documentElement = this.doc.DocumentElement;
            string     xpath           = string.Format("user[@uid='{0}']", uid);
            XmlNode    node            = documentElement.SelectSingleNode(xpath);

            if (node == null)
            {
                return(null);
            }
            XmlAttribute attribute = node.Attributes["pwd"];
            var          user      = new SSOUser();

            user.Uid      = uid;
            user.Password = attribute.Value;
            return(user);
        }