获取并设置登录用户详细信息 [英] get and set logged in user details

查看:112
本文介绍了获取并设置登录用户详细信息的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述





我在api控制器中完成登录过程我想在另一个控制器中使用登录的用户ID和用户名。怎么可能呢。请帮助我

解决方案

是的,当用户登录时,您可以在会话中存储UserID和其他详细信息,并在需要的地方使用它们。

我使用了formauthentication.setauthcookies


Hi,

my login process done in an api controller i want to use the logged in userid and username in another controller. how can it possible. please help me

解决方案

Yes, when the user logged in, you can store the UserID and other details in session and use them where ever it is required.


i used formauthentication.setauthcookies


这篇关于获取并设置登录用户详细信息的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆