Example #1
0
        /// <summary>
        /// Gets information from the data source for a user. Provides an option to update the last-activity date/time stamp for the user.
        /// </summary>
        /// <param name="username">The name of the user to get information for.</param>
        /// <param name="userIsOnline">true to update the last-activity date/time stamp for the user; false to return user information without updating the last-activity date/time stamp for the user.</param>
        /// <returns>
        /// A <see cref="T:System.Web.Security.MembershipUser"></see> object populated with the specified user's information from the data source.
        /// </returns>
        public override System.Web.Security.MembershipUser GetUser(string username, bool userIsOnline)
        {
            MembershipUser user = CobaltWebApi.GetUserByUserName(username);

            if (user != null)
            {
                return(this.CreateMembershipUser(user));
            }
            return(null);
        }
Example #2
0
        public override User GetUser(string userName)
        {
            MembershipUser user = CobaltWebApi.GetUserByUserName(userName);

            if (user != null)
            {
                User newUser = new User()
                {
                    Id = user.Id, ApplicationName = base.ApplicationName, IsApproved = true
                };
                newUser.SetUserName(userName);
                return(newUser);
            }
            return(null);
        }
Example #3
0
 /// <summary>
 /// Retrieves the membership users.
 /// </summary>
 /// <param name="emailAddress">The email address.</param>
 /// <returns></returns>
 protected virtual MembershipUserCollection RetrieveMembershipUsers(string userName)
 {
     return(this.ConvertToMembershipUserCollection(new MembershipUser[] { CobaltWebApi.GetUserByUserName(userName) }));
 }