R2i DotNetNuke® Forum

R2i wants you to have the opportunity to ask questions, post reviews, help others or just rant and rave about DotNetNuke® or any of the R2i Modules and Skins. Our team spends hour upon hour, day after day, working on custom DotNetNuke® modules and services; please feel free to ask us anything.
 
User Import Error
Last Post 11 Mar 2009 06:56 PM by svedire. 4 Replies.
Printer Friendly
Sort:
PrevPrev NextNext
You are not authorized to post a reply.
Author Messages Informative
LenLatimerUser is Offline
New Member
New Member
Posts:15

--
23 Aug 2008 11:23 PM  
I have a CSV with a header and two data records - one is a new user, the second is a exiting one to be updated. I check for the UserID>0 and set the userprofile to the userID else to -1 (if it doesn't exist). I then set other profile properties. On the save I get this error returned:

Username already exists, or password is not long enough for creating a new user. = '' = False

Although I get the error on both saves, the existing user fields are updated properly. Any ideas? The password is longer than 7 and the username for the new one doesn't exist.

Is the "Save" keyword also used for existing users (rather something like update?)

Below are the actions:

# Assignment: Assign <UserInfo> variable to 'Save,myNewContactID'.
# 40. If [myNewContactID.Error,Action] = ''
# 41. Execute Query[UpdateSuccess]: Update Lynx_ImportTest set etc...
# 42. Else
# 43. Execute Query[UpdateError]: etc.
# 44. Else


pauldesUser is Offline
Veteran Member
Veteran Member
Posts:1392

--
24 Aug 2008 09:38 PM  
Click the ADD REPLY button and attach your configuration in an XML file. It's kind of hard to determine problems with the limited information. If I had to guess, #40 will NEVER equal true because you don't have single quotes around your left condition. It should be

If '[myNewContactID.Error,Action]' = ''


ListX....makes you look brilliant, even though you're not.
robert_chumleyUser is Offline
Advanced Member
Advanced Member
Posts:592

--
25 Aug 2008 01:44 PM  
Also, make sure there are not other required fields that are not present on your UserInfo object. DNN make not like that.
Thanks,


Robert Chumley<br>r2integrated (formally bi4ce)
LenLatimerUser is Offline
New Member
New Member
Posts:15

--
25 Aug 2008 10:50 PM  
I've enclosed the module export and csv file. You were right on using the ' - now the exiting user get updated without an error but new users don't. I set to -1, added PortID, UserName, email and Password. The save error comes back as '' but it creates user -1. Here's the debug:

+ If '[vUserID,SelectImport]' = '0'
# '0' = '0' = True
# Passed: Handling child actions.
# Executing
# Assignment: Assign <UserInfo> variable to '-1'.
* Executing
# Assignment: Assign <UserInfo> variable 'PortalID' to '[Portalid,System]'.
* Executing
* Assigned UserInfo (PortalID)
* Assigned Property (PortalID)
# Assignment: Assign <UserInfo> variable 'UserName' to '[vUserName,SelectImport]'.
* Executing
* Assigned Property (UserName)
# Assignment: Assign <UserInfo> variable 'Email' to '[vEmail,SelectImport]'.
* Executing
* Assigned UserInfo (Email)
* Assigned Membership (Email)
* Assigned Property (Email)
# Assignment: Assign <UserInfo> variable 'Password' to '[vPassword,SelectImport]'.
* Executing
* Assigned Membership (Password)
* Assigned Property (Password)
# Assignment: Assign <UserInfo> variable to 'Save,myNewContactID'.
* Executing
* Creating User
* Created User -1
# If '[MyNewContactID.Error,Action]' <> ''
* '' <> '' = False
* Failed: Skipping child actions.

Attachment: lynxImport.ZIP

svedireUser is Offline
Basic Member
Basic Member
Posts:128

--
11 Mar 2009 06:56 PM  
Hi,

I think you should also be setting the DisplayName property for the <UserInfo> object. Usually, we set the dsipaly name to be their the userame or the combination of firstname and lastname. After a user is created, the user id can be access using [mynewContactID,Action] (action variable specified after Save).

Let us know if you encounter any more issues.

Thanks,
Sindura
R2integrated



You are not authorized to post a reply.

Active Forums 4.1
 

New York, NY • Baltimore, MD • Vienna, VA • St. Louis, MO • Seatle, WA • 410.327.0007 • info@R2Integrated.com

Bookmark & Share Bookmark and Share