Copied to clipboard

Flag this post as spam?

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


  • Sachin 19 posts 49 karma points
    Mar 24, 2010 @ 07:08
    Sachin
    0

    Query related to Business Logic

    Hi,

    I am using

    umbraco.cms.businesslogic.member.Member member = umbraco.cms.businesslogic.member.Member.GetMemberFromLoginNameAndPassword(UserName, Password);

    to verify users credentials.

    How can I get id for the member id as well as member group to which the validated member belongs?

    Prompt response would be greatly appreciated.

    Thanks in advance,

  • skiltz 501 posts 701 karma points
    Mar 24, 2010 @ 08:26
    skiltz
    0

    You can get the roles a user belong to using Roles.GetRolesForUser(User.Identity.Name)

    You can get a users current username like User.Indentity.Name

    You can get a users current member id using something like umbraco.cms.businesslogic.member.Member.GetCurrentMember().Id

  • Dirk De Grave 4541 posts 6021 karma points MVP 3x admin c-trib
    Mar 24, 2010 @ 08:33
    Dirk De Grave
    0

    As skiltz points out, use Roles.GetRolesForUser() to get groups member belongs to. Id of member is just as simple as 

    umbraco.cms.businesslogic.member.Member member = umbraco.cms.businesslogic.member.Member.GetMemberFromLoginNameAndPassword(UserName, Password);
    var memberId = member.Id;

     

    Cheers,

    /Dirk

  • Sachin 19 posts 49 karma points
    Mar 24, 2010 @ 08:59
    Sachin
    0

    Hi,

    Thanks for your prompt response.

Please Sign in or register to post replies

Write your reply to:

Draft