Example #1
0
        public static Account CreateAccount(string email, string password, Account.UserLevels userLevel = Account.UserLevels.User)
        {
            var account = new Account(email, password, userLevel);
            Accounts.Add(email, account);
            account.SaveToDB();

            return account;
        }
Example #2
0
        public static Account CreateAccount(string email, string password)
        {
            var account = new Account(email, password);
            Accounts.Add(email, account);
            account.SaveToDB();

            return account;
        }
Example #3
0
        public static Account CreateAccount(string email, string password, string battleTag, Account.UserLevels userLevel = Account.UserLevels.User)
        {
            var hashCode = AccountManager.GetUnusedHashCodeForBattleTag(battleTag);
            var account = new Account(email, password, battleTag, hashCode, userLevel);
            Accounts.Add(email, account);
            account.SaveToDB();

            return account;
        }
Example #4
0
        public static Account CreateAccount(string email, string password, Account.UserLevels userLevel = Account.UserLevels.User)
        {
            var account = new Account(email, password, userLevel);

            Accounts.Add(email, account);
            account.SaveToDB();

            return(account);
        }
Example #5
0
        public static Account CreateAccount(string email, string password, string battleTag, Account.UserLevels userLevel = Account.UserLevels.User)
        {
            var hashCode = AccountManager.GetUnusedHashCodeForBattleTag(battleTag);
            var account  = new Account(email, password, battleTag, hashCode, userLevel);

            Accounts.Add(email, account);
            account.SaveToDB();

            return(account);
        }
Example #6
0
        public static Account GetAccountByEmail(string email)
        {
            Account account;

            if (Accounts.ContainsKey(email))
                account = Accounts[email];
            else
            {
                account = new Account(email);
                Accounts.Add(email, account);
                account.SaveToDB();
            }

            return account;
        }