Пример #1
0
    public void Authentication()
    {
        users = databaseAccess.ReadInAccounts(users);
        string username = usernameInput.text;
        string password = passwordInput.text;
        string fullName = fullNameInput.text;

        if (!(string.IsNullOrWhiteSpace(username)) && !(string.IsNullOrWhiteSpace(password)) && !(string.IsNullOrWhiteSpace(fullName)))
        {
            if (CheckUsername(username) == false)
            {
                interfaceScriptAccess.CloseOpenInterface(usernameExists);
            }
            else
            {
                newAccount.username = username;
            }
            if (CheckPassword(password) == false)
            {
                interfaceScriptAccess.CloseOpenInterface(passwordInvalid);
            }
            else
            {
                CreatePassword(password); interfaceScriptAccess.CloseOpenInterface(register); interfaceScriptAccess.CloseOpenInterface(adminCodePanel); adminCodeButton.onClick.AddListener(CheckAdminCode);
            }
            newAccount.fullName = fullName;
        }
        else
        {
            interfaceScriptAccess.CloseOpenInterface(blanks);
        }
    }
Пример #2
0
    public void Authentication()
    {
        List <User> users = new List <User>();

        users = databaseAccess.ReadInAccounts(users);
        string username = usernameInput.text;
        string password = passwordInput.text;

        if (CheckLogin(users, username, password) == true)
        {
            interfaceScriptAccess.CloseOpenInterface(adminPanel);
        }
        else
        {
            interfaceScriptAccess.CloseOpenInterface(error);
        }
    }