Copied to clipboard

Flag this post as spam?

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


  • Scott Hugh Alexandar Petersen 349 posts 164 karma points
    Mar 01, 2012 @ 16:11
    Scott Hugh Alexandar Petersen
    0

    Logging OUT backend user via api

    Hi everybody,

    I know that the logging in a backend user via api has been covered here in the forum. But how do you actually log a user OUT from the backend using an api call?

    Umbraco 4.7.1.1
    IIS 7.5

    Thanks

  • Scott Hugh Alexandar Petersen 349 posts 164 karma points
    Mar 01, 2012 @ 16:52
    Scott Hugh Alexandar Petersen
    0

    Well it is as easy as redirecting to the ~/umbraco/logout.aspx page, but still looking into the api call

  • Thomas Höhler 1237 posts 1709 karma points MVP
    Mar 01, 2012 @ 16:59
    Thomas Höhler
    0

    Therefore that it is a asp.net membership provider I assume that you can do it with the standard membership functions. e.g with forms authentication it would be 

     

    System.Web.Security.FormsAuthentication.SignOut();
    

    hth, Thomas

     

  • Scott Hugh Alexandar Petersen 349 posts 164 karma points
    Mar 01, 2012 @ 17:03
    Scott Hugh Alexandar Petersen
    0

    Hey, I tried that firstly but no good.

    The redirect of the page is the only valid way that I have come by until now.

    Thanks!

  • Thomas Höhler 1237 posts 1709 karma points MVP
    Mar 01, 2012 @ 17:14
    Thomas Höhler
    0

    hmm, interesting, will take a look later

  • Scott Hugh Alexandar Petersen 349 posts 164 karma points
    Mar 01, 2012 @ 17:16
    Scott Hugh Alexandar Petersen
    0

    Sourcecode says base.ClearLogin(); however when puttting that into a razor script is says like this: error CS0117: 'umbraco.MacroEngines.DynamicNodeContext' does not contain a definition for 'ClearLogin'

    Then I tried like this: umbraco.logout.Current.ClearLogin();

    But it gives me this error on page:  Error loading MacroEngine script (file: Login.cshtml)

    Any help appreciated!

Please Sign in or register to post replies

Write your reply to:

Draft