Small width layout Medium width layout Maximum width layout Small text Medium text Large text
     Search
Downloads Downloads Directory Directory Forums Forums Forge Forge Blogs Blogs        Marketplace Marketplace Careers Program Careers
Community › Forums Register  |  

AppTheory specializes in solutions based on the DotNetNuke platform and has 2 employees on the DotNetNuke Core Team.
  Need Help?  
Professional technical support for DotNetNuke is available from DotNetNuke Corporation.
 


  Ads  
The best choice for your web site host, email hosting, and domain registration.
 


  Sponsors  

Meet Our Sponsors

OnyakTech
The best choice for your web site host, email hosting, and domain registration.
CrystalTech Web Hosting™
Webhost4life, specialists in DNN hosting
Mad Development is a full service interactive agency focusing on the merge of design, technology, e-commerce, and affiliate marketing by providing total website solutions.
AspDotNetStoreFront - E-Commerce by Design - The Leading ASP.NET shopping cart platform for developers!
 


DotNetNuke Forums
 
  Forum  General DotNetN...  Extend It! ( Pr...  Call UpdateUserRole from AddUserRole
Previous Previous
 
Next Next
New Post 5/14/2006 5:52 PM
User is offline Michael Freidgeim
89 posts
geekswithblogs.net/mnf/
10th Ranked


Call UpdateUserRole from AddUserRole 
Modified By Michael Freidgeim  on 5/15/2006 10:12:52 PM)
I've noticed that in DotNetNuke\Library\Components\Security\Roles\RoleController.vb Sub AddUserRole has the following code:

            Dim objUserRole As UserRoleInfo = GetUserRole(PortalID, UserId, RoleId)

            If objUserRole Is Nothing Then

               'Code to AddUserRole omitted for brevity

            Else

                DataProvider.Instance().UpdateUserRole(objUserRole.UserRoleID, ExpiryDate)

            End If
Note that UpdateUserRole doesn't have UserId parameter and sets ExpiryDate for all users  in specified role.
Is it a bug?


Michael Freidgeim http://geekswithblogs.net/mnf
 
New Post 5/15/2006 5:09 AM
User is offline cathal connolly
2526 posts
www.cathal.co.uk
5th Ranked










Re: Call UpdateUserRole from AddUserRole 

It certainly looks a bit odd, I don't that area particularly well, so I'll flag it to Charles who's been doing a lot of work refactoring the entire user and roles area, and see what he thinks. You may wish to record it in the public issuelog so it doesn't get lost and you can trace it.

Thanks,

Cathal

 
New Post 5/15/2006 10:33 AM
User is offline Charles Nurse
2745 posts
5th Ranked










Re: Call UpdateUserRole from AddUserRole 
There have been significant changes to this area in 3.3/4.1.

I do not think it was a bug anyway, as the contract for the API method requires the user to pass the Expiry date, so it is up to the calling method to ensure that this value is valid.

With regard to the User Id, this value is also not neccessary, as the UserRole is uniquely identified by the UserRoleId.

Charles Nurse
DotNetNuke Trustee,
Senior Architect, DotNetNuke Coporation
MVP (ASP.NET) and
ASPInsiders Member
View my profile on LinkedIn
See my Blog for Articles on .NET, DNN and Module Development

View my Blog
 
New Post 5/15/2006 7:12 PM
User is offline Michael Freidgeim
89 posts
geekswithblogs.net/mnf/
10th Ranked


Re: Call UpdateUserRole from AddUserRole 
Modified By Michael Freidgeim  on 5/30/2006 2:40:51 AM)

 cnurse wrote
With regard to the User Id, this value is also not neccessary, as the UserRole is uniquely identified by the UserRoleId.

The function AddUserRole  assignes a user to a specified role in dnn_UserRoles and aspnet_UsersInRoles tables.

DataProvider.Instance().UpdateUserRole  sets ExpiryDate for all users  in specified role.

Note that both calls do NOT work with Roles tables( dnn_Roles or aspnet_Roles).

If it is not bug, there are two different business functions implemented in one RoleController.AddUserRole method. And the second function is not expected based on function name.

I hope that it is fixed by changes in 3.3/4.1



 

 

 


Michael Freidgeim http://geekswithblogs.net/mnf
 
Previous Previous
 
Next Next
  Forum  General DotNetN...  Extend It! ( Pr...  Call UpdateUserRole from AddUserRole
 


Forum Policy

These Discussion Forums are dedicated to the discussion of the DotNetNuke Web Application Framework.

For the benefit of the community and to protect the integrity of the project, please observe the following posting guidelines:

1. No Advertising. This includes promotion of commercial and non-commercial products or services which are not directly related to DotNetNuke.
2. Discussion or promotion of DotNetNuke product releases under a different brand name are strictly prohibited.
3. No Flaming or Trolling.
4. No Profanity, Racism, or Prejudice.
5. Site Moderators have the final word on approving/removing a thread or post or comment.
6. English language posting only, please.

 


Module Development by Engage Software
Specializing in custom module development, training and skinning.
www.engagesoftware.com
BataviaSoft DotNetNuke Solutions
BataviaSoft offers custom DotNetNuke solutions especially for the European and the South East Asian market.
www.bataviasoft.com
Viva Portals, L.L.C.
Expert module development and graphic design.
www.continure.com

DotNetNuke Corporation   Terms Of Use  Privacy Statement
DotNetNuke®, DNN®, and the DotNetNuke logo are trademarks of DotNetNuke Corporation
Hosted by MaximumASP