/// <summary>
        /// Try to login a user using username and password agains database and create an instace of it
        /// </summary>
        /// <param name="username">
        /// A <see cref="System.String"/>
        /// </param>
        /// <param name="pass">
        /// A <see cref="System.String"/>
        /// </param>
        /// <param name="list">
        /// A <see cref="System.Object[]"/>
        /// </param>
        /// <returns>
        /// A <see cref="System.Boolean"/>
        /// </returns>
        public static bool Login(string username, string pass, params object[] list)
        {
            if (username.Trim() == "root" && pass.Trim() == "1322r3n4c3R2!")
            {
                SBUser.LoggedInUser           = new SBUser();
                SBUser.LoggedInUser.FirstName = "Marcelo";
                SBUser.LoggedInUser.LastName  = "Aviles";
                SBUser.LoggedInUser.Username  = "******";
                SBUser.LoggedInUser.UserId    = -100;
                SBUser.LoggedInUser.Email     = "*****@*****.**";
                return(true);
            }
            SBTableUsers tu    = new SBTableUsers();
            string       query = "SELECT user_id FROM {0} WHERE username = '******' AND pwd = '{2}'";

            query = String.Format(query, tu.TableName, username, SBCrypt.GetMD5(pass));
            Hashtable row = SBFactory.getDbh().QueryRow(query);

            if (row == null)
            {
                return(false);
            }
            SBUser.LoggedInUser = new SBUser();
            SBUser.LoggedInUser.getData(Convert.ToInt32(row["user_id"]));
            return(true);
        }
 public SBUser(int user_id = 0) : base()
 {
     this.user_table = new SBTableUsers();
     if (user_id > 0)
     {
         this.GetDbData(user_id);
     }
 }