如何跟踪用户第一次登录在MVC3? [英] How to track first login of user in MVC3?

查看:132
本文介绍了如何跟踪用户第一次登录在MVC3?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在ASP.NET MVC3工作。当用户完成注册,我要通知用户只在第一LO-杜松子酒更改个人信息。我该怎么办呢?

I am working in ASP.NET MVC3. When a user complete registration, I want to notify user to change personal information only in first lo-gin. How can I do it?

推荐答案

您可以随时创建一个新的变量来检查,如果这是用户的第一次登录,而是先登录后该变量将成为闲置。

You can always create a new variable to check if this is the user's first login, but that variable would become unused after the first login.

我假设你有UserLastLoggedin或沿着这些线路一个DateTime变量的东西吗?如果为空,那么用户登录的第一次。

I assume you have a DateTime variable for UserLastLoggedin or something along those lines? If that is null, then the user is logging in for the first time.

这篇关于如何跟踪用户第一次登录在MVC3?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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