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  |  

Affordable ASP.NET Hosting Service
  Ads  
Aspose - The .NET & Java component publisher
 


  Sponsors  

Meet Our Sponsors

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.
SteadyRain
DataSprings - Great Ideas. Always Flowing.
R2integrated - formerly bi4ce
Jango Studios - Skins, Modules and Hosting for DotNetNuke
 


DotNetNuke Forums
 
  Forum  General DotNetN...  Extend It! ( Pr...  delete users using the DeleteUser method
Previous Previous
 
Next Next
New Post 5/18/2006 9:41 AM
User is offline Sérgio Almeida
16 posts
10th Ranked


delete users using the DeleteUser method 
Greetz

I'm not being able to delete users with the DeleteUser method; this allways return false if I'm not logged in as admin. Why this happens?



 
New Post 5/18/2006 9:56 AM
User is offline Sebastian Leupold
15224 posts
www.deutschnetnuke.de
1st Ranked












Re: delete users using the DeleteUser method 
IMHO this is right, only admins shall be allowed to delete users (and users themselves). Note, that this area will change extensively in DNN 3.3/4.1
Sebastian Leupold

DeutschNetNuke dnnWerk - The DotNetNuke Experts German DotNetNuke User-Group

DotNetNuke Project UserDefinedTable
DotNetNuke Project Release Tracker
 
New Post 5/19/2006 2:37 PM
User is offline Michael Flanakin
994 posts
www.michaelflanakin.com
7th Ranked




Re: delete users using the DeleteUser method 
I'd look into what happens when the user clicks the Unregister link on the user profile. I'm pretty sure this deletes their account. I honestly don't think you have to be an admin to delete users, but I could be wrong - I haven't tried it. I can understand the assumption, but don't agree with it. Anyway, you might also want to dig thru the code to see what that method is doing.

Michael Flanakin | Microsoft Consulting Services
www.michaelflanakin.com
 
New Post 6/12/2006 1:38 AM
User is offline Àlex Peláez
3 posts
experienciasnet.blogspot.com/
10th Ranked


Re: delete users using the DeleteUser method 

And if I want to delete users from an external database programmatically from a Scheduled Task,how can I do it?

Àlex.

 
New Post 6/12/2006 8:46 AM
User is offline Àlex Peláez
3 posts
experienciasnet.blogspot.com/
10th Ranked


Re: delete users using the DeleteUser method 

I have a provisional solution. It is not very elegant but is functional while the version 4.1/3.3 is released. I have created a trigger in the dotnetnuke table "aspnet_Users" that deletes the users from the "Users" table. The delete is in cascade and all information remains consistently (I think). When you need to delet a user you only have to call to the method System.Web.Security.Membership.DeleteUser(username).

The trigger that i have used:
CREATE
TRIGGER [DeleteUsers]
ON [dbo].[aspnet_Users]
AFTER
DELETE
AS

DELETE FROM Users WHERE Username IN (SELECT Username FROM deleted)

Caution: This solution will delete the users from all portals...

Àlex.

 

 
Previous Previous
 
Next Next
  Forum  General DotNetN...  Extend It! ( Pr...  delete users using the DeleteUser method
 


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.

 


Expressnet - DotNetNuke Hosting
Expressnet provide premium quality ASP.NET Web Hosting. We specialise in Windows based products including ASP.NET and Microsoft SQL Server. We offer fantastic value packages for DotNetNuke hosting. We also offer free asp.net web hosting
www.expressnet.com.au
Softech Development, Inc.
We help your business work smarter with DotNetNuke. Whether you need a new implementation, a custom module or skin for an existing implementation, or integration with your business processes, Softech has the experience and expertise to make it happen.
www.softechdevelopment.com
Module Development by Engage Software
Specializing in custom module development, training and skinning.
www.engagesoftware.com

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