Example #1
0
        public static string GetUserRole(this LFAUser user)
        {
            string strRole = "guest";

            if (user.UserName == "admin" && user.Password == "password")
            {
                strRole = "admin";
            }
            else if (user.UserName == "user" && user.Password == "password")
            {
                strRole = "user";
            }
            return(strRole);
        }
Example #2
0
        public LFAUser GetUser(string userName = "******", string password = "******")
        {
            this.UserName = userName;
            this.Password = password;
            return(this);

            LFAUser objUser = new LFAUser(UserName = userName, Password = password);

            return(objUser);

            LFAUser objUser1 = new LFAUser();

            objUser1.UserName = userName;
            objUser1.Password = password;
            return(objUser1);
        }
Example #3
0
 public static bool IsAdmin(this LFAUser user)
 {
     return(user.UserName == "admin" && user.Password == "password");
 }