Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Simon Hiort-Lorenzen 5 posts 25 karma points
    Apr 27, 2012 @ 12:19
    Simon Hiort-Lorenzen
    0

    Add new backoffice user

    Hi,

    I'm rather new to Umbraco. I'd like to add a new backoffice user in 5.1.

    So far I have created a user like so:

                    User newUser = new User();
                    newUser.Name = username;
                    newUser.Username = username;
                    newUser.Password = password;
                    newUser.Email = email;
                    newUser.IsApproved = true;
                    MembershipCreateStatus status;
                    AppContext.Security.Users.Create(newUser, out status);

    It appears in the user list, but it doesn't have access to backoffice.

    So how do I add the new user to the "Administrator" group?

    And how do I give this user access to the different sections in backoffice?

    Thanks,

    Simon

  • Simon Hiort-Lorenzen 5 posts 25 karma points
    May 01, 2012 @ 09:41
    Simon Hiort-Lorenzen
    0

    Can anyone tell me if what I am trying to do is even possible with Umbraco 5.1?

  • Tim 1193 posts 2675 karma points MVP 4x c-trib
    May 03, 2012 @ 11:30
    Tim
    0

    I'm not 100% how you'd do this with v5, as I'm still learning the API, but it should certainly be possible. Your best bet would be to grab the source from Codeplex and see how they do it in the controller for the cms user editor controller, that should show you the code you need I think.

Please Sign in or register to post replies

Write your reply to:

Draft