/// <summary> /// Validates the username and password and returns whether or not the combination is a valid user /// </summary> /// <param name="userName">The username to validate</param> /// <param name="password">The password to match</param> /// <param name="user">The user object created</param> /// <returns> /// true if the combination is a valid user;false otherwise /// </returns> public bool IsValidUser(string userName, string password, out IBasicUser user) { user = new BasicUser(); user.UserName = userName; user.Password = password; return(true); }
/// <summary> /// Validates the username and password and returns whether or not the combination is a valid user /// </summary> /// <param name="userName">The username to validate</param> /// <param name="password">The password to match</param> /// <param name="user">The user object created</param> /// <returns> /// true if the combination is a valid user;false otherwise /// </returns> public virtual bool IsValidUser( string userName, string password, out IBasicUser user ) { user = new BasicUser(); user.UserName = userName; user.Password = password; return true; }
public override bool IsValidUser( string userName, string password, out IBasicUser user ) { if( !string.IsNullOrEmpty( userName ) ) { user = FinanceUser.Load( userName ); return user != null; } user = null; return false; }
public bool IsRequestAllowed(HttpRequest request, IBasicUser user) { if (user != null) { return true; } return false; }
public override bool IsValidUser(string userName, string password, out IBasicUser user) { if (!string.IsNullOrEmpty(userName)) { user = FinanceUser.Load(userName); return(user != null); } user = null; return(false); }
public bool IsValidUser(string userName, string password, string domain, out IBasicUser user) { user = new BasicUser { Domain = domain, UserName = userName, Password = password }; return true; }
public IMessage Apply(string discriminator, IBasicUser owner, object systemData) { string subject = GetSubject(discriminator); string body = GetBody(discriminator); string title = GetTitle(discriminator); subject = RegExpTemplatorHelper.SetObjectProperties(subject, owner); subject = RegExpTemplatorHelper.SetObjectProperties(subject, systemData); body = RegExpTemplatorHelper.SetObjectProperties(body, owner); body = RegExpTemplatorHelper.SetObjectProperties(body, systemData); title = RegExpTemplatorHelper.SetObjectProperties(title, owner); title = RegExpTemplatorHelper.SetObjectProperties(title, systemData); string file = Path.Combine(this.ResourcePath, TEMPLATE); string defaultBody = string.Empty; if (File.Exists(file)) { defaultBody = File.ReadAllText(file); defaultBody = defaultBody.Replace("[BODY]", body); defaultBody = defaultBody.Replace("[TITLE]", title); body = defaultBody; } subject = subject.Replace("[SITEURL]", this.SiteUrl); subject = subject.Replace("[SITENAME]", this.SiteName); body = body.Replace("[SITEURL]", this.SiteUrl); body = body.Replace("[SITENAME]", this.SiteName); IMessage cm = new Message(); cm.Subject = subject; cm.Body = body; return(cm); }
public void InviteUser(BasicUser invitedBy, string comments, FriendProvider friendProvider, IBasicUser contact, bool includeInvitationCode) { List <IBasicUser> lst = new List <IBasicUser>(1); lst.Add(contact); InviteUsers(invitedBy, comments, friendProvider, lst, includeInvitationCode); }
public void SendWithTemplate(string filePrefix, IBasicUser user, object data, string to, string replyTo) { Send(template.Apply(filePrefix, user, data), to, replyTo); }
public void SendWithTemplate(string filePrefix, IBasicUser user, object data, string to) { SendWithTemplate(filePrefix, user, data, to, null); }
/// <summary> /// Determines whether or not the current request is allowed to continue for the given user /// </summary> /// <param name="request">The request to check</param> /// <param name="user">The user</param> /// <returns> /// true if request is authorized;false otherwise /// </returns> public virtual bool IsRequestAllowed( HttpRequest request, IBasicUser user ) { return user.UserName == "nobody"; }
public override bool IsRequestAllowed( System.Web.HttpRequest request, IBasicUser user ) { return user != null && !string.IsNullOrEmpty( user.UserName ); }
/// <summary> /// Determines whether or not the current request is allowed to continue for the given user /// </summary> /// <param name="request">The request to check</param> /// <param name="user">The user</param> /// <returns> /// true if request is authorized;false otherwise /// </returns> public bool IsRequestAllowed(HttpRequest request, IBasicUser user) { return(user.UserName == "nobody"); }
public override bool IsRequestAllowed(System.Web.HttpRequest request, IBasicUser user) { return(user != null && !string.IsNullOrEmpty(user.UserName)); }