Hi. Well yes 'linking' an authorized field to the core field really wouldn't be enough. This is because the SQL event would take place after the authorized field/linked field was saved. You would need to create a SQL event directly to update the user.
Scenerio: You have a textbox field called 'Authorizion code'
Then you execute the SQL Event and would probably need to research the steps for an 'if statement' in SQL but the update would need to update the DNN Membership table directly. I would suggest for testing purposes creating a stored procedure and then just passing the values to the stored procedure in the SQL event.
I.e. stored procedure:
CREATE PROCEDURE AuthUserBasedOnCode
@code varchar(50) , @UserID integer
AS
SET NOCOUNT ON
SELECT AuthCode FROM yourtable
IF @@ROWCOUNT = 0
BEGIN
-- Don't authorize the user because the auth code was not in the table
END
ELSE
BEGIN
UPDATE aspnet_Membership
Set IsApproved = -1
WHERE user_id=@UserID
END
That would the the stored procedure. The SQL event would look something like:
exec AuthUserBasedOnCode '$(AuthCodeShortFieldName)', $(UserID)
The only issue here is that the membership table directly has a UserID GUID and not a userID integer. I forget what the relation ional table is but you would need to get the GUID from the UserID integer before actually updating the table in the procedure.
IF you end up needing some assistance you might submit a request for some consulting or development hours for our team on this. Or if anyone else has done this please post to help out, I think once the stored procedure and event was written it could be very helpful for others.
-Chad