网站导航网学 原创论文 原创专题 网站设计 最新系统 原创论文 论文降重 发表论文 论文发表 UI设计定制 论文答辩PPT格式排版 期刊发表 论文专题
返回网学首页
网学原创论文
最新论文 推荐专题 热门论文 论文专题
当前位置: 网学 > 编程文档 > ASP.net > 正文

ASP.net自定义成员资格用户MembershipUser类

论文降重修改服务、格式排版等 获取论文 论文降重及排版 论文发表 相关服务
bsp;                     ByVal isSubscriber As Boolean, _
                                     ByVal customerID As String, _
                                     ByRef status As MembershipCreateStatus) _
                          As OdbcMembershipUser

    Dim Args As ValidatePasswordEventArgs = _
      New ValidatePasswordEventArgs(username, password, True)

    OnValidatingPassword(Args)

    If Args.Cancel Then
        status = MembershipCreateStatus.InvalidPassword
        Return Nothing
    End If


    If RequiresUniqueEmail AndAlso GetUserNameByEmail(email) <> "" Then
        status = MembershipCreateStatus.DuplicateEmail
        Return Nothing
    End If

    Dim u As MembershipUser = GetUser(username, False)

    If u Is Nothing Then
        Dim createDate As DateTime = DateTime.Now

        If providerUserKey Is Nothing Then
            providerUserKey = Guid.NewGuid()
        Else
            If Not TypeOf providerUserKey Is Guid Then
                status = MembershipCreateStatus.InvalidProviderUserKey
                Return Nothing
            End If
        End If

        Dim conn As OdbcConnection = New OdbcConnection(connectionString)
        Dim cmd As OdbcCommand = New OdbcCommand("INSERT INTO Users " & _
               " (PKID, Username, Password, Email, PasswordQuestion, " & _
               " PasswordAnswer, IsApproved," & _
               " Comment, CreationDate, LastPa

  • 下一篇资讯: Datagrid控件的事件声明
  • 设为首页 | 加入收藏 | 网学首页 | 原创论文 | 计算机原创
    版权所有 网学网 [Myeducs.cn] 您电脑的分辨率是 像素
    Copyright 2008-2020 myeducs.Cn www.myeducs.Cn All Rights Reserved 湘ICP备09003080号 常年法律顾问:王律师