Dnn Code creates a user's createuser () method

Source: Internet
Author: User

I see a SectionCode:
Dim createstatus as usercreatestatus = usercontroller. createuser (ouserinfo)
Creates a user.
Then I want to find the definition about createuser.
Later, I found the createuser (ouserinfo) definition under namespace dotnetnuke. Entities. Users.
But in:
Public shared function createuser (byref objuser as userinfo) as usercreatestatus
The following information is found:
Createstatus = memberprovider. createuser (objuser)
I continue searching for the memberprovider class

Namespace dotnetnuke. Security. Membership has public mustinherit class membershipprovider

I found:

Public mustoverride function createuser (byref user as userinfo) as usercreatestatus
So where is the specific createuser () method defined.
I know that there is another sqlmembershipprovider in dnn, but where is it associated?

Actually, the specific instantiation of createuser is not in dotnetnuke. Entities. Users.
You see:
<textarea cols="50" rows="15" name="code" class="c-sharp">Createstatus = memberprovider. createuser (objuser)</textarea>
The definition of memberprovider is:
<textarea cols="50" rows="15" name="code" class="c-sharp">Private shared memberprovider as dotnetnuke. Security. Membership. membershipprovider = dotnetnuke. Security. Membership. membershipprovider. instance ()</textarea>
Find the definition of instance:
<textarea cols="50" rows="15" name="code" class="c-sharp">Public shared shadows function instance () as membershipprovider <br/> return dotnetnuke. componentmodel. componentfactory. getcomponent (of membershipprovider) () <br/> end Function</textarea>
This membershipprovider is obtained through web. config, and is defined in other web. config:
<textarea cols="50" rows="15" name="code" class="c-sharp"><Membership defaultprovider = "aspnetsqlmembershipprovider" userisonlinetimewindow = "15"> <br/> <Add name = "aspnetsqlmembershipprovider" type = "system. web. security. sqlmembershipprovider "connectionstringname =" sitesqlserver "character =" true "enablepasswordreset =" true "character =" false "character =" 7 "character =" 0 "requiresuniqueemail =" false "passwordformat =" encrypted "applicationname =" dotnetnuke "Description =" stores and retrieves membership data from the local Microsoft SQL Server database "/> <br/></textarea>
Here we finally know that the specific function instantiation is in:

Type = "system. Web. Security. sqlmembershipprovider"

. We found

System. Web. Security. sqlmembershipprovider <br/>

.

 

In fact

'Return the provider <br/> Public shared shadows function instance () as membershipprovider <br/> return dotnetnuke. componentmodel. componentfactory. getcomponent (of membershipprovider) () <br/> end Function

When the problem occurs, although I know it is related to sqlmembershipprovider, but I do not know how to associate it.

The getcomponent () is defined in namespace dotnetnuke. componentmodel.

Public Function getcomponent (of tcontract) () as tcontract <br/> verifycontainer () <br/> return container. getcomponent (of tcontract) () <br/> end Function

The definition of transition to iner is

# Region "Private Members" </P> <p> private _ container as icontainer </P> <p> # End Region </P> <p> # region "public properties "</P> <p> Public Property container () as icontainer <br/> Get <br/> return _ container <br/> end get <br/> set (byval value as icontainer) <br/> _ Container = value <br/> end set <br/> end property </P> <p> # End Region

I don't know how to find it later.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.