Great Ideas. Always Flowing.

We are not happy until you are happy. Client satisfaction guaranteed. Whatever your needs and requirements, we have the skills and resources for the job!

Quick login...


Or... now make it easy with Facebook Integration
Connect via Facebook



Top Sellers

Frustrated over the lack of customization for your user's registration fields? Dynamically setup your DNN Portal with custom registration fields, layout, questions, and other core integration options......

Ultra Video Gallery is a brother product of Ultra Media Gallery, UVG allows you to upload videos in various format and automatically encode them to flv or H264 format, you also can add videos from internet or record live videos from your webcam.

Build high performance, completely customizable data-entry forms and views driven by your DNN and external databases. New built-in tools make it a snap to quickly create data entry forms, data views, and even database tables. Plus, add your own HTML, CSS, Javascript, SQL commands, stored procedures,

The most advanced DotNetNuke shopping cart on the planet. Easy to use e-Commerce, Secure Shopping Cart Software and SEO friendly. B2C / B2B Ecommerce Sites.

One stop solution for events calendar and events registration! FREE DOWNLOAD is available now!

Auto-Authorize Users
Last Post 07-01-2008 10:54 AM by David Linda. 3 Replies.
AddThis - Bookmarking and Sharing Button Printer Friendly
  •  
  •  
  •  
  •  
  •  
Sort:
PrevPrev NextNext
You are not authorized to post a reply.
Author Messages
Bryan TompkinsUser is Offline
new to the springs
new to the springs
Posts:1
Avatar

--
04-11-2007 04:41 AM

    I am looking for a method to allow users to be automatically authorized for a portal when they enter a "Authorization Code" upon registration.  I have setup a link Dynamic Registration field to link to the DNN Core Authorize field.  I assume that this could be done with a Dynamic SQL statement that change the 'Authorize' field from NO to YES, but I don't know enough SQL to figure our the the specifics.  The linked dynamic authorized field is [DR Authorize].  Any help would be appreciated.

    Chad NashUser is Offline
    Posts:5260
    Avatar

    --
    04-12-2007 08:22 AM

    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

    Chad NashUser is Offline
    Posts:5260
    Avatar

    --
    04-12-2007 08:35 AM
    There is also a table called UserPortals which might need to be updated as well.

    -Chad
    David LindaUser is Offline
    new to the springs
    new to the springs
    Posts:2
    Avatar

    --
    07-01-2008 10:54 AM
    We ran into this problem as well. Here is the script that we used to solve it.

    CREATE PROCEDURE [dbo].[Fresco_AuthorizeUser]

    @UserId int,
    @PortalId int
    AS

    declare @UserName nvarchar(100)

    select @UserName = Username from Users where UserID = @UserId
    if (@UserName is not null)
    begin
    update aspnet_membership
    set IsApproved = 1
    where UserID = (select UserID from aspnet_Users where UserName = @UserName)

    update UserPortals
    set Authorised = 1
    where UserId = @UserId and PortalId = @PortalId
    end

    Then create an completion event using this code:


    execute Fresco_AuthorizeUser $(UserID), $(PortalID)

    -David L
    You are not authorized to post a reply.


     
     

    Join our mailing list...

    Get current news and events the easy way
    Subscribe Me

    Recent Blogs...

     
    Copyright 2005 - 2011 by Data Springs, Inc.
     
  • film izle
  • 720 izle
  • film
  • sinema izle
  • film makinesi
  • T�rk�e dublaj film
  • film izle
  • film izle
  • baglan film izle
  • sinema izle
  • 1080 film izle
  • film mercegi