New Community Website

Ordinarily, you'd be at the right spot, but we've recently launched a brand new community website... For the community, by the community.

Yay... Take Me to the Community!

Welcome to the Community Exchange, where community members ask and answer questions about DNN. To get started, just start typing your question below and either select one of the suggested questions or ask a new question of your own.

Authenticate user and get userinfo through services framework API

Return to previous page

  • 4/1/2014
  • 5778 Views

Question:

Sach Sachin long time ago

I have created a service to get user email. When I run a service I get user email. But, I want to authenticate user using API and for that user retrieve email , then how to do that?    

This is the code I have written to get email

[AllowAnonymous]

[HttpGet]

public HttpResponseMessage GetEmail(string username)

{

DotNetNuke.Entities.Users.UserInfo ui;

ui = DotNetNuke.Entities.Users.UserController.GetUserByName(username);

return Request.CreateResponse(HttpStatusCode.OK, ui.Email);

}

Help !

Example would be helpful

Authenticate user and get userinfo through services framework API

Sach Sachin
Sach Sachin long time ago
Add an Answer

Answers

Sign In to Participate
Or register to become a member