How can I use DotNetNuke's built-in Sessions a

2019-08-28 05:52发布

Does anyone have an example of how to use DNN's built-in functionality for a custom Login Module which can store the User Login with a Session and Cookie?

I don't want to re-invent the wheel.

Thanks

1条回答
霸刀☆藐视天下
2楼-- · 2019-08-28 06:36

Check out DotNetNuke.Entities.Users.UserController. It has all kinds of methods for user handling. For login it has

void UserLogin(int portalId, UserInfo user, string portalName, string ip, bool createPersistentCookie);
UserInfo UserLogin(int portalId, string username, string password, string verificationCode, string portalName, string ip, ref UserLoginStatus loginStatus, bool createPersistentCookie);
查看更多
登录 后发表回答