Posted By Steve Aunan on 06/19/2009 5:55 PM
I'm also trying to use two SQL statements to set "Authorised=True" or "Authorsed=False" depending on whether ActiveMember = 1 or 0. Here's the SQL:
- UPDATE dbo.UserPortals SET Authorised = 'True' WHERE (PortalId = 0) and (UserId = $(UserID))
- When: Initial and Import Updates
- AND ActiveMember = 1
There's a similar rule setting Authorised='False' When ActiveMember = 0.
Problem: Users do NOT get Authorised on Initial Import, but they DO get Authorised on Import Updates.
I've been working with this some more today. A new Update Only definition has two emails and two SQL statements, both tied to the ActivMember Token.
If ActiveMember = 1:
- Send an "account updated" email
- Use SQL to set Authorised = 'True'
If ActiveMember = 0:
- Send an "account deactivated" email
- Use SQL to set Authorised = 'False'
The emails are sent to the correct users, but only the Authorised = 'True" statement gets processed. Below is the latest Schedule History report. J.Doe is the Authorised user (ActiveMember=1). R.Roe is the UnAuthorised user (ActiveMember=0).
DataSprings.DNN.Modules.UserImport.UserImportProcess, DataSprings.DNN.Modules.UserImport
Interactive User Import Log: importing:'Update Users - Members';
logging enabled';
limited records per instance feature is turned off;
Excel File:'D:\wwwroot\Portals\0\******.xls';
Static File:'';
Excel Sheet Name:'Sheet1';
Sucessfully Loaded File w/ Row Count:'2';
---------------New Imported User---------------
Records:1
Display Name:Joe Blow
PortalID:0
Updated User:J.Blow
User Status(success):J.Blow: AddUser
Preparing to Process Email Events
Process When: 1
Event to Process for Updated Registration Only - New User? False
Event to Process for Updated Registration Only - True, continue processing...
Process (True or False): True
Checking to see if the users property 1 which is for field ID 49 matches with the filtered value of 1
Sending message to user: "Joe Blow"
Message sent sucessfully!
Preparing to Process Email Events
Process When: 1
Event to Process for Updated Registration Only - New User? False
Event to Process for Updated Registration Only - True, continue processing...
Process (True or False): True
Checking to see if the users property 1 which is for field ID 49 matches with the filtered value of 0
Preparing to Process SQL
Process When: 1
Event to Process for Updated Registration Only - True, continue processing...
Checking to see if the users property 1 which is for field ID 49 matches with the filtered value of ActiveMember
Preparing to Process SQL
Process When: 1
Event to Process for Updated Registration Only - True, continue processing...
Checking to see if the users property 1 which is for field ID 49 matches with the filtered value of ActiveMember
---------------New Imported User---------------
Records:2
Display Name:Richard Roe
PortalID:0
Updated User:R.Roe
User Status(success):R.Roe: AddUser
Preparing to Process Email Events
Process When: 1
Event to Process for Updated Registration Only - New User? False
Event to Process for Updated Registration Only - True, continue processing...
Process (True or False): True
Checking to see if the users property 0 which is for field ID 49 matches with the filtered value of 1
Preparing to Process Email Events
Process When: 1
Event to Process for Updated Registration Only - New User? False
Event to Process for Updated Registration Only - True, continue processing...
Process (True or False): True
Checking to see if the users property 0 which is for field ID 49 matches with the filtered value of 0
Sending message to user: "Richard Roe"
Message sent sucessfully!
Preparing to Process SQL
Process When: 1
Event to Process for Updated Registration Only - True, continue processing...
Checking to see if the users property 0 which is for field ID 49 matches with the filtered value of ActiveMember
Preparing to Process SQL
Process When: 1
Event to Process for Updated Registration Only - True, continue processing...
Checking to see if the users property 0 which is for field ID 49 matches with the filtered value of ActiveMember
total records imported:2;