Products

Solutions

Resources

Partners

Community

Blog

About

QA

Ideas Test

New Community Website

Ordinarily, you'd be at the right spot, but we've recently launched a brand new community website... For the community, by the community.

Yay... Take Me to the Community!

Welcome to the DNN Community Forums, your preferred source of online community support for all things related to DNN.
In order to participate you must be a registered DNNizen

HomeHomeDevelopment and...Development and...Building ExtensionsBuilding ExtensionsModulesModulesThe proper way to create DNN user from codeThe proper way to create DNN user from code
Previous
 
Next
New Post
11/23/2010 2:59 AM
 
Thanks Sergey.

DNN version: 5.5.0

The user is in the db. But not show in the Users page (Admin --> Users).

I try to add 3 times using Will's code, and it's successful added in the db. But still no luck to show in the Users page. I believe the code is correct because it can add in the db. I check in the Users table and aspnet_users table also.

It makes me a little bit frustating :)

thank you for any clue.
 
New Post
11/23/2010 3:13 AM
 
Agung

There is one reason why it does not show you in the Admin/Users - probably your user belongs to another portal. Can you take UserID from previous query and run another query SELECT * FROM {databaseOwner}{objectQualifier}UserPortals WHERE UserID=your_number; Then you will know what portal user belongs to.

Also another reason why user does not appear in the list of users is because user can be SuperUser. Super Users list is under Host/SuperUsers - try to look it there.

Sergey
 
New Post
11/23/2010 3:34 AM
 
IMHO the best option is running a query against vw_users, which provide user and userportal details.

Cheers from Germany,
Sebastian Leupold

dnnWerk - The DotNetNuke Experts   German Spoken DotNetNuke User Group

Speed up your DNN Websites with TurboDNN
 
New Post
11/23/2010 3:37 AM
 
All users are belongs to PortalId=0

In my previous code, i set the newUser.IsSuperUser = false. So, there is no other superuser exist except the default one.

I think I found the problem.

The code is right.
The users page is also right.
The usersportals is right (but a little bit suspecting)

When I open the UserPortals table, the user still exist BUT with IsDeleted=1. Hey, this means that everytime I deleted a user from Admin --> Users, so the user is still in the database? :-o

So, it is clearly now when UserController.GetUserByName() always getting NOT NULL. Because the user IS in the table.

How to make it permanently deleted?

Thank you.
 
New Post
11/23/2010 3:46 AM
 
Sebastian

Sorry, its my fail  Yes, it is better to use view vw_users.

Sergey
 
Previous
 
Next
HomeHomeDevelopment and...Development and...Building ExtensionsBuilding ExtensionsModulesModulesThe proper way to create DNN user from codeThe proper way to create DNN user from code


These Forums are dedicated to discussion of DNN Platform and Evoq Solutions.

For the benefit of the community and to protect the integrity of the ecosystem, 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 DNN.
  2. No vendor trolling / poaching. If someone posts about a vendor issue, allow the vendor or other customers to respond. Any post that looks like trolling / poaching will be removed.
  3. Discussion or promotion of DNN Platform product releases under a different brand name are strictly prohibited.
  4. No Flaming or Trolling.
  5. No Profanity, Racism, or Prejudice.
  6. Site Moderators have the final word on approving / removing a thread or post or comment.
  7. English language posting only, please.
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out