Difference between revisions of "PT Profile Auto Create"
From ADF Docs
(→Configuration Point) |
|||
Line 6: | Line 6: | ||
Call the Profile Service autoCreateProfile function and pass in the data value structure that was populated. The return value is true/false for if the profile record was created. (see example below) | Call the Profile Service autoCreateProfile function and pass in the data value structure that was populated. The return value is true/false for if the profile record was created. (see example below) | ||
− | == | + | == Customization == |
* /ADF/apps/pt_profile/components/ProfileService.cfc | * /ADF/apps/pt_profile/components/ProfileService.cfc | ||
** Function autoCreateProfile - Process to create the profile record and profile pages for the data values structure. | ** Function autoCreateProfile - Process to create the profile record and profile pages for the data values structure. | ||
Below is a sample script to set up the data value structure and then call the Profile Service autoCreateProfile function. | Below is a sample script to set up the data value structure and then call the Profile Service autoCreateProfile function. | ||
− | + | <source lang="java"> | |
− | + | dataValues = StructNew(); | |
− | + | dataValues.userid = "testm"; | |
− | + | dataValues.firstName = "Mike"; | |
− | + | dataValues.lastName = "Test"; | |
− | + | dataValues.email = "testm@paperthin.com"; | |
− | + | // Call Profile Service to create account | |
− | + | pageStatus = application.ptProfile.profileService.autoCreateProfile(dataValues); | |
− | + | // Render out status | |
− | + | WriteOutput("autoCreateLogin status = #pageStatus#"); | |
− | + | </source> | |
[[Category:Profile]] | [[Category:Profile]] | ||
[[Category:Customization]] | [[Category:Customization]] |
Latest revision as of 16:20, 29 March 2010
Overview
The Auto Create process will create a profile custom element record and all profile pages.
Set up a data values structure with the structure key the same names as the profile element fields. This structure will populate the profile record.
Call the Profile Service autoCreateProfile function and pass in the data value structure that was populated. The return value is true/false for if the profile record was created. (see example below)
Customization
- /ADF/apps/pt_profile/components/ProfileService.cfc
- Function autoCreateProfile - Process to create the profile record and profile pages for the data values structure.
Below is a sample script to set up the data value structure and then call the Profile Service autoCreateProfile function.
dataValues = StructNew();
dataValues.userid = "testm";
dataValues.firstName = "Mike";
dataValues.lastName = "Test";
dataValues.email = "testm@paperthin.com";
// Call Profile Service to create account
pageStatus = application.ptProfile.profileService.autoCreateProfile(dataValues);
// Render out status
WriteOutput("autoCreateLogin status = #pageStatus#");