Products

Solutions

Resources

Partners

Community

Blog

About

QA

Ideas Test

New Community Website

Ordinarily, you'd be at the right spot, but we've recently launched a brand new community website... For the community, by the community.

Yay... Take Me to the Community!

Welcome to the DNN Community Forums, your preferred source of online community support for all things related to DNN.
In order to participate you must be a registered DNNizen

HomeHomeArchived Discus...Archived Discus...Developing Under Previous Versions of .NETDeveloping Under Previous Versions of .NETASP.Net 2.0ASP.Net 2.0Auto Login LogicAuto Login Logic
Previous
 
Next
New Post
12/11/2007 1:04 PM
 

Hey everyone, 

I have inherited a DNN portal that an old programmer setup and that is slightly customized already with some auto login logic.

Users log into a ERP system which then redirects to a DNN portal, with some of the user information in the query string.  My question to you all is there a way to store a custom feild like "Employee_Number".   I would like to be able to use that employee number in links to specific information that the employee would need access to.

The problem right  now, is that we put that employee number in a cookie, but seems to be having some issues on some user machines.

Any advice or direction would be great.  I am pretty new to .net and DNN so i this is all doable.

--------------------------------------------------------------------------------------

 

DotNetNuke.ModulesDotNetNuke.Security.Membership

Public

 

 

 

 

UserController.UserLogin(_portalID, objUser, PortalSettings.PortalName, _IPAddress,

Class SSOAutoInherits DotNetNuke.Entities.Modules.PortalModuleBaseSub AutoLogin(ByVal _portalID As Long, ByVal _username As String, ByVal _password As String, ByVal _IPAddress As String)Dim loginStatus As UserLoginStatusDim objUser As UserInfo = UserController.ValidateUser(_portalID, _username, _password, "", PortalSettings.PortalName, _IPAddress, loginStatus)False) 'UserAuthorized(objUser, False)

 

End Sub

 

 

Sub AutoUserTest(ByVal _portalid As Long, ByVal _username As String, ByVal _password As String, ByVal _lastname As String, ByVal _firstname As String, ByVal _email As String)' Add New User to Portal User Database

 

 

 

 

Dim objSecurity As New PortalSecurityDim objUserInfo As UserInfoDim _test As Boolean

objUserInfo = UserController.GetUserByName(_portalid, _username,

 

 

 

False)If Not objUserInfo Is Nothing Then 'And UserControl.UserName <> _UserName Then

_test =

False

 

Else

_test =

True

 

 

 

objNewUser.PortalID = _portalid

objNewUser.Profile.FirstName = _firstname

Dim userCreateStatus As UserCreateStatus = userCreateStatus.AddUserDim AffiliateId As Integer = Null.NullIntegerDim objNewUser As New UserInfo'UserControl.FirstName

objNewUser.Profile.LastName = _lastname

'UserControl.LastName

objNewUser.FirstName = _firstname

objNewUser.LastName = _lastname

objNewUser.DisplayName = _firstname &

objNewUser.Username = _username

" " & _lastname'UserControl.UserName

objNewUser.Email = _email

'+"monty.alger@ge.com" 'UserControl.Email

objNewUser.Membership.Password = _password

'UserControl.Password

objNewUser.Membership.Approved =

True 'Convert.ToBoolean(IIf(PortalSettings.UserRegistration <> PortalRegistrationType.PublicRegistration, False, True))

objNewUser.AffiliateID = AffiliateId

userCreateStatus = UserController.CreateUser(objNewUser)

 

If userCreateStatus = userCreateStatus.Success Then

 

 

'store preferredlocale in cookie

DotNetNuke.Services.Localization.Localization.SetLanguage(objNewUser.Profile.PreferredLocale)

 

End If

 

End If

 

'AutoUserTest = _test

 

  

End Sub

 

 

Sub DoAutoLogin(ByVal _username As String, ByVal _password As String, ByVal _lastname As String, ByVal _firstname As String, ByVal _email As String)Dim _pw As String

 

AutoUserTest(

_pw = _password

 

 

End

 

Dim _IPaddress As String = HttpContext.Current.Request.UserHostAddress.ToString()Me.PortalId, _username, _password, _lastname, _firstname, _email)Call AutoLogin(Me.PortalId, _username, _pw, _IPaddress)End Sub Class

 

Imports 

 

Imports

 
New Post
12/11/2007 2:58 PM
 

We do something very similar. In my case, we make the username be the employee number so it's really easy to get to. If that's not an option, you can easily extend the user profile with a new "employee number" property. You can ghen pull it out of the profile.

 
New Post
12/11/2007 7:36 PM
 

How  would you extend the user profile to have an employee Number? Sorry if this is very basic, im learning .net from classic asp and learing DNN all at the same time.

 

 
New Post
12/28/2007 10:56 AM
 

How would you create an employeeID field as part of the profile to be able to add to.  this way i could store the number there instead of in a cookie.

Any help would be great.  Thanks so much everyone!

 
Previous
 
Next
HomeHomeArchived Discus...Archived Discus...Developing Under Previous Versions of .NETDeveloping Under Previous Versions of .NETASP.Net 2.0ASP.Net 2.0Auto Login LogicAuto Login Logic


These Forums are dedicated to discussion of DNN Platform and Evoq Solutions.

For the benefit of the community and to protect the integrity of the ecosystem, please observe the following posting guidelines:

  1. No Advertising. This includes promotion of commercial and non-commercial products or services which are not directly related to DNN.
  2. No vendor trolling / poaching. If someone posts about a vendor issue, allow the vendor or other customers to respond. Any post that looks like trolling / poaching will be removed.
  3. Discussion or promotion of DNN Platform product releases under a different brand name are strictly prohibited.
  4. No Flaming or Trolling.
  5. No Profanity, Racism, or Prejudice.
  6. Site Moderators have the final word on approving / removing a thread or post or comment.
  7. English language posting only, please.
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out