Small width layout Medium width layout Maximum width layout Small text Medium text Large text
     Search
Downloads Downloads Directory Directory Forums Forums Forge Forge Blogs Blogs        Marketplace Marketplace Careers Program Careers
Community › Forums Register  |  

AspDotNetStoreFront
  Need Help?  
Professional technical support for DotNetNuke is available from DotNetNuke Corporation.
 


  Ads  
Webhost4Life - $4.95 Windows Hosting
 


  Sponsors  

Meet Our Sponsors

Portal Webhosting - Hosting For Developers
Red-Gate Software
MaximumASP
SourceGear - Tools for Developers
.: CounterSoft :.
telerik
 


DotNetNuke Forums
 
  Forum  General DotNetN...  Extend It! ( Pr...  Auto Login Logic
Previous Previous
 
Next Next
New Post 12/11/2007 9:04 AM
User is offline FMRock
12 posts
10th Ranked


Auto Login Logic 

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 10:58 AM
User is offline Craig Walker
238 posts
9th Ranked




Re: Auto Login Logic 

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 3:36 PM
User is offline FMRock
12 posts
10th Ranked


Re: Auto Login Logic 

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 6:56 AM
User is offline FMRock
12 posts
10th Ranked


Re: Auto Login Logic 

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 Previous
 
Next Next
  Forum  General DotNetN...  Extend It! ( Pr...  Auto Login Logic
 


Forum Policy

These Discussion Forums are dedicated to the discussion of the DotNetNuke Web Application Framework.

For the benefit of the community and to protect the integrity of the project, 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 DotNetNuke.
2. Discussion or promotion of DotNetNuke product releases under a different brand name are strictly prohibited.
3. No Flaming or Trolling.
4. No Profanity, Racism, or Prejudice.
5. Site Moderators have the final word on approving/removing a thread or post or comment.
6. English language posting only, please.

 


Software Development and Integration with DNN
HNP Solutions focuses on the pragmatic use of technology and process to meet an organization's business objectives. HNP Solutions employs seasoned Enterprise and Solution Architects, Delivery Managers and QA & Business Leads. Our capabilities range from project assessments & recommendations, design & code reviews, to full program implementations. We also work with organizations in need of senior staff augmentation purposes in the areas of Enterprise and Solution architecture.
www.hnpsolutions.com
Willhite & Sharron Realtors
Exemplary service for your Seattle Real Estate needs. It's what you deserve from your Realtor®!
www.alkihomes.com
PointClick DotNetNuke Solutions
PointClick Technologies provides high-end DNN Hosting for businesses.
PointClick.Net Hosted Solutions

DotNetNuke Corporation   Terms Of Use  Privacy Statement
DotNetNuke®, DNN®, and the DotNetNuke logo are trademarks of DotNetNuke Corporation
Hosted by MaximumASP