1-888-365-2779
+1-888-365-2779
Try Now
More in this section

Forums / General Discussions / Managing logged in user

Managing logged in user

8 posts, 1 answered
  1. Andrew
    Andrew avatar
    5 posts
    Registered:
    16 Nov 2010
    04 Jan 2011
    Link to this post
    We have a site that will have two different kinds of users, Users and Admin. Users will be authenticated using our existing customer database whereas Admin will use the Sitefinity database. After the a User logs in, what is the best way to keep track of their username?
  2. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    16 Jun 2017
    04 Jan 2011
    Link to this post
    Hi Andrew,

    You cannot just authenticate a user in Sitefinity. This should be Telerik.Sitefinity.Security.Model.User which is Sitefinity's 4.0 own custom object. You should have a membership provider that inherits from Telerik.Sitefinity.Security.Data.MembershipDataProvider. This is an abstract class which is used by the OpenAccess implementation - OpenAccessMembershipProvider.

    Best wishes,
    Ivan Dimitrov
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
  3. Andrew
    Andrew avatar
    5 posts
    Registered:
    16 Nov 2010
    04 Jan 2011
    Link to this post
    Thanks for the reply, can you point me to a tutorial or documentation?
  4. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    16 Jun 2017
    05 Jan 2011
    Link to this post
    Hi Andrew,

    You can take a look at this post which provides a basic sample for custom membership provider.
    We do not have a complete example for a custom membership provider.


    All the best,
    Ivan Dimitrov
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
    Answered
  5. Andrew
    Andrew avatar
    5 posts
    Registered:
    16 Nov 2010
    12 Jan 2011
    Link to this post
    Thanks for this. The only issue I'm having now is that I can't create a user when no one is logged in. I get the error below. Is there a way to impersonate an administrator?

    You are not authorized to 'Manage Users' ('Backend').

    Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. 

    Exception Details: System.UnauthorizedAccessException: You are not authorized to 'Manage Users' ('Backend'). 
  6. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    16 Jun 2017
    12 Jan 2011
    Link to this post
    Hello Andrew,

    You should be logged in with a user who has Manage Users permissions, otherwise you cannot use the API. You can grant a user or role from Administration >> Permissions.

    Best wishes,
    Ivan Dimitrov
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
  7. Johar Iqbal
    Johar  Iqbal avatar
    10 posts
    Registered:
    20 Aug 2009
    22 Feb 2011
    Link to this post
    Hi,

    If internet user want to change their password, this error still comes. and how we will add that user to the role.


    thanks
    Johar Iqbal
  8. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    16 Jun 2017
    22 Feb 2011
    Link to this post
    Hi ,

    If you do not have permissions to change users password - "Manage Users" you cannot do this. You should call SuppressSecurityChecks or grant anonymous user. It is better to use SuppressSecurityChecks property from the provider.

    All the best,
    Ivan Dimitrov
    the Telerik team
8 posts, 1 answered