Exemplo n.º 1
0
        public virtual async Task SubmitRegistration(string username, string password, string email)
        {
            string tok = Guid.NewGuid().ToString();
            bool   t;

            if (await manager.IsValidNameOrEmail(username, email) && username.Length < 20 && password.Length >= 6)
            {
                MailProvider.SendMail(email, tok);
                await manager.InsertUser(username, email, password, tok, false);

                t = true;
            }
            else
            {
                t = false;
            }
            Clients.Caller.onRegistration(t);
        }