How can I use DotNetNuke's built-in Sessions and Cookies for my own login module?

眉间皱痕 提交于 2019-12-25 03:44:50

问题


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:


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);


来源:https://stackoverflow.com/questions/54307759/how-can-i-use-dotnetnukes-built-in-sessions-and-cookies-for-my-own-login-module

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!