Copied to clipboard

Flag this post as spam?

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


  • Fredrik Esseen 610 posts 906 karma points
    Sep 10, 2009 @ 09:08
    Fredrik Esseen
    0

    Display admin login on webpage?

    Is it possible to display/insert the login form in any way on the webpage? 
    My customer wants to let their customers to have an own page that they can update. Feels more user friendly to display the login in the template rather than giving them an url..

  • Dirk De Grave 4541 posts 6021 karma points MVP 3x admin c-trib
    Sep 10, 2009 @ 09:16
    Dirk De Grave
    1

    froad,

    Are those customers defined as members or users? If the latter, you could use buit-in umbraco features for redirecting to canvas mode after logging in. If the first, you could just drop a asp.net login control onto the template for members to log in. you might want to need some custom dev to redirect members to their own page on succesful login.

     

    Hope this helps.

    Regards,

    /Dirk

  • Fredrik Esseen 610 posts 906 karma points
    Sep 10, 2009 @ 09:53
    Fredrik Esseen
    0

    Perfect!

    But if I define a start node in the content section for the user, then that is sufficient, right? I wal also thinking of just let them use canvas mode.

  • Fredrik Esseen 610 posts 906 karma points
    Sep 10, 2009 @ 09:57
    Fredrik Esseen
    0

    I want the user to be able to update text and insert images. What kind of user type is appropriate?

  • Fredrik Esseen 610 posts 906 karma points
    Sep 10, 2009 @ 10:34
    Fredrik Esseen
    0

    I've created he login control but cant login

    <

     

    asp:Login ID="Login1" runat="server">

     

    <LayoutTemplate>

     

    <table border="0" cellpadding="1" cellspacing="0"

     

    style="border-collapse:collapse;">

     

    <tr>

     

    <td>

     

    <table border="0" cellpadding="0">

     

    <tr>

     

    <td align="center" colspan="2">

     

    <asp:Label ID="LoginHeader" runat="server" /></td>

     

    </tr>

     

    <tr>

     

    <td>

     

    <asp:TextBox ID="UserName" runat="server"></asp:TextBox>

     

    <asp:RequiredFieldValidator ID="UserNameRequired" runat="server"

     

    ControlToValidate="UserName" ErrorMessage="User Name is required."

     

    ToolTip="User Name is required." ValidationGroup="ctl00$Login1"></asp:RequiredFieldValidator>

     

    </td>

     

    <td>

     

    <asp:TextBox ID="Password" runat="server" TextMode="Password"></asp:TextBox>

     

    <asp:RequiredFieldValidator ID="PasswordRequired" runat="server"

     

    ControlToValidate="Password" ErrorMessage="Password is required."

     

    ToolTip="Password is required." ValidationGroup="ctl00$Login1"></asp:RequiredFieldValidator>

     

    </td>

     

    <td align="right" colspan="2">

     

    <asp:Button ID="LoginButton" runat="server" CommandName="Login" Text="Log In"

     

    ValidationGroup="ctl00$Login1" Style="background-image: url(/images/loggain.png); background-repeat: no-repeat;" BackColor="Transparent" BorderStyle="None" ForeColor="Transparent" Height="25px" Width="80px" />

     

    </td>

     

    <tr>

     

    <td align="center" colspan="3" style="color:Red;">

     

    <asp:Literal ID="FailureText" runat="server" EnableViewState="False"></asp:Literal>

     

    </td>

     

    </tr>

     

    </table>

     

    </td>

     

    </tr>

     

    </table>

     

    </LayoutTemplate>

    </

     

    asp:Login>

    Do I have to do some codebehind to connect to the Umbraco API?

  • Dirk De Grave 4541 posts 6021 karma points MVP 3x admin c-trib
    Sep 10, 2009 @ 10:53
    Dirk De Grave
    0

    Nope, you don't need codebehind, but:

    - do you have at least one (1) member type in the admin backend?

    - did you set the the alias for that member type on the membership provider in the web.config (not really required if you only have a single member group, but still best practice)

    <add name="UmbracoMembershipProvider" 
      type="umbraco.providers.members.UmbracoMembershipProvider" 
      enablePasswordRetrieval="false" enablePasswordReset="false" 
      requiresQuestionAndAnswer="false" 
      defaultMemberTypeAlias="AliasOfMemberType" />

    Btw, in this case, you'll be using members, right? 

    Cheers,

    /Dirk

     

  • Fredrik Esseen 610 posts 906 karma points
    Sep 10, 2009 @ 11:52
    Fredrik Esseen
    0

    Sorry, didnt answer your first question: no, I want to it to be users. Isnt that easier if i want them to be able to edit their page?

  • Dirk De Grave 4541 posts 6021 karma points MVP 3x admin c-trib
    Sep 10, 2009 @ 13:22
    Dirk De Grave
    0

    froad,

    if using users then using asp.net login controls doesn't make sense (this is only for membership stuff). if you wish users to update their own pages, you should consider setting their start page in umbraco admin backend, or if you want them to be able to edit from frontend, use option to 'redirect to canvas mode' (altho only <umbraco:Item></umbraco:Item> can be edited with canvas)

    Does that clarify things for you?

     

    Cheers,

    /Dirk

     

  • Fredrik Esseen 610 posts 906 karma points
    Sep 10, 2009 @ 17:04
    Fredrik Esseen
    0

    Yes, so far that is exactly what I want, but the difference si that I want the user to be able to login from the webpage, not have to use an url like : www.mydomain/umbraco

    But if I can let members create pages, edit content and insert images then that is better. Is that possible?

  • Fredrik Esseen 610 posts 906 karma points
    Sep 11, 2009 @ 16:43
    Fredrik Esseen
    0

    I have a new solution for my problem.

    What I want to achieve is that I have a part of the webpage that is closed for normal users but a group of people should be allowed to log in.

    On person is going to be an umbraco user that can login to normal backend but is redirected to canvas mode and should be able to edit and create pages.

    Then I use the membership to let the other people of the group to login on the webpage and be redirected to their private site.

    The only problem I have left is that when the user logs in to the backend and gets redirected to the page he gets bounced to my login-page since he is not a member! How can I get the user to be able to edit the protected page in canvas mode??

  • Nik Wahlberg 639 posts 1237 karma points MVP
    Sep 17, 2009 @ 02:06
    Nik Wahlberg
    0

    Sorry, I am confused. So, you only want people who have logged in as Users to be able to see the member login form? Who are the 'other' people that you refer to? Also, what is the 'private site'?

    Om det ar enklare att forklara pa Svenska sa kan du gora det istalle :) 

    Cheers,
    Nik

     

  • Fredrik Esseen 610 posts 906 karma points
    Sep 17, 2009 @ 08:27
    Fredrik Esseen
    0

    I think its best for the rest to keep it in english :)

    I have one part of the site that is protected and needs log in. Certain members can log in and see the information. Now I have created a user that has rights to edit this part and want him to do this in canvas mode. The only problem is that when he log in and gets redirected to canvas mode he gets redirected to my login page for members since he is not logged in.

    I hope Im a bit clearer this time :)

    So, Nik, youre swedish?

  • Nik Wahlberg 639 posts 1237 karma points MVP
    Sep 29, 2009 @ 18:40
    Nik Wahlberg
    0

    I see what you're saying. Unfortunately in this case, you're talking about two separte membership providers that don't share state (session). You could probably dig into the core and combine the two, but that would sever the ability to manage members separately. Can you restrict the 'user'' (admin) to only see this page in the content tree? It sounds like you're trying to accomplish something like that, where you don't want the user to see other certain sections.

    Yes, I am Swedish. Been in the US now for almost 10 years. I come from Gavle originally.

    Thanks,
    Nik

  • This forum is in read-only mode while we transition to the new forum.

    You can continue this topic on the new forum by tapping the "Continue discussion" link below.

Please Sign in or register to post replies