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!

redirect based on role expiration
Last Post 03-25-2010 01:04 AM by netspan. 19 Replies.
AddThis - Bookmarking and Sharing Button Printer Friendly
  •  
  •  
  •  
  •  
  •  
Sort:
PrevPrev NextNext
You are not authorized to post a reply.
Author Messages
Shawn O'ConnorUser is Offline
going with the flow
going with the flow
Posts:41
Avatar

--
07-01-2008 12:38 PM

    Is it possible to setup a page redirect such that when a user's membership to a particular role expires that they are redirected to another page?

    I tried setting up some rules so that if a user is a member of  "Group A" they get directed to one page and if they are also a part of another group -- group B -- then they get directed to a different page.  If the user is a member of Group A and Group B then I set a rule so that they get redirected to Group B's page.  That works fine.  However, if that person's membership to Group B expires then there is no difference.  As the user is logically no longer part of Group B (the role is expired for that user), I would expect that the rule directing that user to the "Group A" page would take priority. 

    Is there another solution to this problem?  --Thanks.

    Shawn O'ConnorUser is Offline
    going with the flow
    going with the flow
    Posts:41
    Avatar

    --
    07-06-2008 08:27 AM
    Anybody?
    Chad NashUser is Offline
    Posts:5260
    Avatar

    --
    07-10-2008 08:21 AM
    So when the users role expires... Is it still taking them to Group B? Where is it redirecting them to if its not Redirecting them to A or B?

    -Chad
    Shawn O'ConnorUser is Offline
    going with the flow
    going with the flow
    Posts:41
    Avatar

    --
    07-10-2008 08:43 AM

    It's as though it doesn't "see" that the role has expired.  It still takes them to Group B.  Thanks for looking into this.

    Chad NashUser is Offline
    Posts:5260
    Avatar

    --
    07-10-2008 10:13 AM

    Yep... We have discovered that this is a bug, its checking the UserRoles table and not the expiry date. We have updated the code but the module is currently undergoing some additional 'surgery' as we are adding the features to check for 'force password change' etc...

    We should have a fix out within the next few weeks, sorry for the problem. In the mean time as a work around you could delete from the userroles table where the expiry date is less than the current date (such as an automated nightly SQL process or something?) just thinking of a work around for now...


    -Chad

    Shawn O'ConnorUser is Offline
    going with the flow
    going with the flow
    Posts:41
    Avatar

    --
    07-10-2008 10:49 AM

    I thought about that, but I don't want the person to be removed from the role.  I want them to be a part of a role that gets renewed.  So from a login redirect order of precedence the system should check to see if that person's role is active; if not, then redirect to the basic registered user's role (or some other) and invite them to renew their subscription.  When they renew their subscription events should fire that extend their role membership from today's date + the length of their membership.

     

    Actually, that does bring up a question -- I wonder if the event will fire?  If I have an event that adds a user to a role for "X" amount of time upon the successful purchase of a subscription through Paypal -- if that person is already a member of said role will it extend the membership or just do nothing?  And will it extend the role membership from the time it expired or from the time it was purchased?

    Thanks. -- Shawn

    Shawn O'ConnorUser is Offline
    going with the flow
    going with the flow
    Posts:41
    Avatar

    --
    12-14-2008 11:48 AM
    Any word on this? It's been more than a few weeks...Maybe it's already fixed and I just missed the memo about the patch? Please?
    Shawn O'ConnorUser is Offline
    going with the flow
    going with the flow
    Posts:41
    Avatar

    --
    12-14-2008 11:52 AM

    As a suggestion for an enhancement -- it would be nice to set a status to redirect a given user to a specific page upon the status of the role they've been assigned.  So if role status is current, then the default function of the module.  If the role has expired, then something else -- redirect to a different page.

    Chad NashUser is Offline
    Posts:5260
    Avatar

    --
    12-16-2008 11:56 AM

    Shawn,

    Hi. Unfortunatly we do not have a fix out for this yet. We are somewhat under 'surgery' with Dynamic Login for it to also support the ability to redirect the user to Dynamic Registration for the ability to force password and profile changes etc... This has been fixed within the code for the next release but the only good work around for now would be to remove roles from users if they have already expired. We are shooting for a Feb 1st release of an updated version of Dynamic Login but I am not certain as we have several new enhancements coming.

    The suggested work arounds for this would be:
    1. Remove roles from users where the role date/time has expired
    2. Modify the GetUserRole stored procedure within the DNN Core to only pull in the user role if the expire date is less then the current date.

    Your suggestion would be a nice enhancement, we will review this after the next release. Again, this code has been changed to check the expire date, we just can't release it yet as there are other enhancements that are not yet done.


    -Chad

    Chad NashUser is Offline
    Posts:5260
    Avatar

    --
    12-18-2008 11:12 AM
    Shawn,

    Hi. I just wanted to follow up on this thread. We are actively working on the next build and it will add the enhancement you mentioned here as well (ability to setup different redirect events based on role status such as Active VS expired etc...)

    -Chad
    netspanUser is Offline
    wading in the water
    wading in the water
    Posts:21
    Avatar

    --
    02-24-2010 03:29 AM
    Posted By Chad Nash on 12/18/2008 1:12 PM
    Shawn,

    Hi. I just wanted to follow up on this thread. We are actively working on the next build and it will add the enhancement you mentioned here as well (ability to setup different redirect events based on role status such as Active VS expired etc...)

    -Chad
     



     

    The subject of this discussion seems to be exactly what I am trying to do. I have a number of roles in my site; I want to make one specific role have their passwords expire after 90 days, but all the other roles never expire. So I am looking for a means to redirect a user to a 'create new passwrd' page if they are in the specific role but their 90 days has expired. I am using version 3.10.20 of Dynamic Login, 4.0.30 Dynamic Registration (from the Module Definitions page). I cannot see anything in the Dynamic Login module management that lets me set conditional redirects as discussed in the thread above.

    netspanUser is Offline
    wading in the water
    wading in the water
    Posts:21
    Avatar

    --
    03-01-2010 04:23 AM

    OK I found the Renewal Reminder module. I can use this to create the reminder emails and I can use a bit of custom SQL in a scheduled job to set the 'force password renewal' flag when the role expires. So no problem...

    David ToUser is Offline
    river guide
    river guide
    Posts:2719
    Avatar

    --
    03-01-2010 06:38 AM
    HI, sorry didn't respond sooner but yes, Renewal Reminder would be a perfect fit for your needs. -- David
    chupaulUser is Offline
    going with the flow
    going with the flow
    Posts:42
    Avatar

    --
    03-19-2010 10:18 AM

    Hi NetSpan,

    I was wondering if you could share the custom Sql you're using to "force password renewal" when the role expires ?

    Many Thanks, Paul

     

    netspanUser is Offline
    wading in the water
    wading in the water
    Posts:21
    Avatar

    --
    03-23-2010 04:42 AM

    Paul

    I haven't actually written the update yet! I did the research to locate the fields in the DNN tables that relate to the issue. There is a bit column UpdatePassword in the Users table, but the LastPasswordChangeDate is in the aspnet_Membership table which is indexed by the aspnet UserID which is different to the DNN UserID. The problem is to relate the whole lot. This is a query I developed to lookup the fields for users in a particular role:

     

    netspanUser is Offline
    wading in the water
    wading in the water
    Posts:21
    Avatar

    --
    03-23-2010 04:52 AM

    the system simply discarded the code I tried to insert. Then it discarded a new message I sent. I am currently looking for a way to post code in this forum.

    netspanUser is Offline
    wading in the water
    wading in the water
    Posts:21
    Avatar

    --
    03-23-2010 05:44 AM

    OK, looks like there is some formatting issue if I cut-and-paste directly from SQL Server Management Studio. Instead I have removed all formatting by passing it through notepad. Hopefully this will enable iy to be read here...

     

    declare @AppId uniqueidentifier
    select @AppID = ApplicationId from dbo.aspnet_Applications
    where LoweredApplicationName = 'dotnetnuke'

    declare @PortalID int
    set @PortalID = 0
     SELECT    
      U.UserID, U.Username, U.UpdatePassword,
      UP.PortalId,
      UP.IsDeleted,
      AU.UserId AS AspNet_UserId,
      AM.LastPasswordChangedDate
     FROM dbo.UserPortals AS UP
       RIGHT OUTER JOIN dbo.UserRoles  UR
       INNER JOIN dbo.Roles R ON UR.RoleID = R.RoleID
       RIGHT OUTER JOIN dbo.Users AS U ON UR.UserID = U.UserID
       INNER JOIN dbo.aspnet_Users AU on U.Username = AU.UserName ON UP.UserId = U.UserID 
       INNER JOIN dbo.aspnet_Membership AM on AU.UserId = AM.UserId
     WHERE ( UP.PortalId = @PortalID OR @PortalID IS Null )
      AND (UP.IsDeleted = 0 OR UP.IsDeleted Is NULL)
      AND (R.RoleName = 'xyz')
      AND (R.PortalId = @PortalID OR @PortalID IS Null )
      AND AU.ApplicationId = @AppID

    chupaulUser is Offline
    going with the flow
    going with the flow
    Posts:42
    Avatar

    --
    03-24-2010 06:39 PM

    Hi Netspan,

    Ok, I will give it a try tomorrow.

    Thanks for the sql !

    Regards, Paul

     

    netspanUser is Offline
    wading in the water
    wading in the water
    Posts:21
    Avatar

    --
    03-25-2010 01:01 AM

    Paul

    Here is my finished stored procedure:

    SET ANSI_NULLS ON
    GO
    SET QUOTED_IDENTIFIER ON
    GO

    CREATE PROCEDURE [dbo].[ExpireUsersByRole]
     @PortalID int,
     @RoleName varchar(50),
     @ExpireDays int
    AS
     declare @AppId uniqueidentifier
     select @AppID = ApplicationId from dbo.aspnet_Applications
     where LoweredApplicationName = 'dotnetnuke'

     declare @CutOffDate datetime
     select @CutOffDate = Dateadd(day,-@ExpireDays,Getdate())

     declare @t table
     (
      UserName nvarchar(100)
     

     update dbo.Users set UpdatePassword = 1
     OUTPUT INSERTED.UserName INTO @t
      FROM dbo.UserPortals AS UP
        RIGHT OUTER JOIN dbo.UserRoles  UR
        INNER JOIN dbo.Roles R ON UR.RoleID = R.RoleID
        RIGHT OUTER JOIN dbo.Users AS U ON UR.UserID = U.UserID
        INNER JOIN dbo.aspnet_Users AU on U.Username = AU.UserName ON UP.UserId = U.UserID 
        INNER JOIN dbo.aspnet_Membership AM on AU.UserId = AM.UserId
      WHERE ( UP.PortalId = @PortalID OR @PortalID IS Null )
       AND U.UpdatePassword = 0
       AND (UP.IsDeleted = 0 OR UP.IsDeleted Is NULL)
       AND (R.RoleName = @RoleName)
       AND (R.PortalId = @PortalID OR @PortalID IS Null )
       AND AU.ApplicationId = @AppID
       AND AM.LastPasswordChangedDate < @CutOffDate
     -- pass back the users that have been expired
     select * from @t
     

    This does the update and returns a list of the users who were expired.

    When your expired users try to log in, the Dynamic Login module will redirect them according to the module configuration as if the site admin had set the flag to force them to renew their passwords. So remember to configure that otherwise nothing useful will happen!

    HTH

    netspanUser is Offline
    wading in the water
    wading in the water
    Posts:21
    Avatar

    --
    03-25-2010 01:04 AM

    That smiley should be a simple closing bracket to match the one at the start of the table definition. Forum software too clever for its own good!

     

    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