예제 #1
0
 public bool UserIsAuthorizedForChild(User user)
 {
     #if DEBUG
     return true;
     #endif
     return Users.Contains(user);
 }
 private void LoadProfileInfo(User user)
 {
     txtFirstName.Text = user.FirstName;
     txtLastName.Text = user.LastName;
     txtEmail.Text = user.Email;
     txtPhone.Text = user.PhoneNumber;
     txtCity.Text = user.City;
     txtState.Text = user.State;
 }
        private void AddUserToDatabase()
        {
            var userName = RegisterUser.UserName;
            var user = new User()
            {
                LoginName = userName,
                Email = userName
            };

            DataContext.Users.AddObject(user);
            DataContext.SaveChanges();
        }
        private void AddUserToDatabase()
        {
            var userName = RegisterUser.UserName;
            var user = new User()
            {
                LoginName = userName,
                Email = userName
            };

            DataContext.Users.AddObject(user);
            DataContext.SaveChanges();

            var msg = new MailMessage("*****@*****.**", "*****@*****.**");
            msg.Subject = "Message from DLB Website: New User Registered";
            msg.IsBodyHtml = true;
            msg.Body = "<h1>" + msg.Subject + "</h1>" +
                "<a href='http://" + Request.ServerVariables["HTTP_HOST"] + "/admin/UserManagement/SearchForUser.aspx?q="+ user.DisplayName.ToString() + "'>Click to review " + user.DisplayName.ToString() + "</a>";
            ;

            var mailer = new SmtpClient();
            mailer.Send(msg);
            Response.Write("Your registration has been submitted for review and assignment.");
        }
 /// <summary>
 /// Deprecated Method for adding a new object to the Users EntitySet. Consider using the .Add method of the associated ObjectSet&lt;T&gt; property instead.
 /// </summary>
 public void AddToUsers(User user)
 {
     base.AddObject("Users", user);
 }
 /// <summary>
 /// Create a new User object.
 /// </summary>
 /// <param name="id">Initial value of the ID property.</param>
 /// <param name="loginName">Initial value of the LoginName property.</param>
 public static User CreateUser(global::System.Int64 id, global::System.String loginName)
 {
     User user = new User();
     user.ID = id;
     user.LoginName = loginName;
     return user;
 }
예제 #7
0
 public bool UserIsAuthorizedForChild(User user)
 {
     return Users.Contains(user);
 }
예제 #8
0
 public bool UserHasAccessToAsset(User user)
 {
     return true;
 }