soap - Drupal and netForum: Creating a User -
I am trying to create a user in a web form from a Drupal webform.
Using a webform hook, I call two functions for users to get an email address and first and last name, and when a user submits original webforms, they create a netform account.
However, when I suppress submissions, and the error from 'Watchdog Netform' could not be 'Head Head' Have I done something wrong in my implementation? I'm getting a timeout.
function inclind_form_webform_submission_insert ($ node, $ Submissions) {// email address $ form_fields = $ node- & gt; Webform ['components']; Forex Currency ($ form_fields $ key = & gt; $ value) {$ arguments = array (); $ Reaction = ''; If ($ value ['type'] == 'email') {$ arguments = array ('emailToMatch' => $ deposit-> Data [$ key] ['value'] [0]); $ Response = netforum_xweb_request ('WEBWebUserFindUsersByEmail', $ argument, NULL); If (! Isset ($ response) || $ response- & gt; {@ attributes} ['recordResult'] == 0) {inclind_form_create_netforum_user ($ form_fields, $ submissions); }}} Return; } / * * Create user netForum based on form data * @param $ Form_fields * passed in the form structures inclind_form_webform_submission_insert * @param $ presents * pass from inclind_form_webform_submission_insert form data * / function inclind_form_create_netforum_user (presented $ form_fields, $) { $ Argument = array (); $ Argument ['ovbusar'] ['personal'] = array (); $ Argument ['ovbusar'] ['email'] = array (); $ Argument ['oWebUser'] ['customer'] = array (); $ Argument ['ovbusar'] ['business_edder'] = array (); $ Argument ['oWebUser'] ['Business_Phone'] = array (); $ Logic ['oWebUser'] ['Business_Phone_XRef'] = array (); $ Argument ['ovbusar'] ['business_fax'] = array (); $ Argument ['ovbusar'] ['business_fax_xrf'] = array (); Foreign currency ($ form_fields $ key = & gt; $ value) {if ($ value ['form_key'] == 'ind_first_name') {$ argument ['oWebUser'] ['personal'] ['ind_first_name'] = $ Deposit - & gt; Data [$ key] ['value'] [0]; } If ($ value ['form_key'] == 'ind_last_name') {$ arguments ['oWebUser'] ['personal'] ['ind_last_name'] = $ deposit-> Data [$ key] ['value'] [0]; } & Amp; strlen ($ argument ['oWebUser'] ['personal'] ['ind_last_name'])} (Strlen ($ argument ['oWebUser'] ['personal'] ['ind_first_name']) If {$ argument ['ovbusar'] ['personal'] ['ind_ful__ name'] = $ argument ['ovbusar'] ['personal'] ['ind_first_name'] '' $ Logic ['oWebUser'] ['personal'] ['ind_last_name']; } If ($ value ['form_key'] == 'eml_address') {$ argument ['oWebUser'] ['email'] ['eml_address'] = $ deposit-> Data [$ key] ['value'] [0]; $ Logic ['oWebUser'] ['customer'] ['cst_web_login'] = $ deposit- & gt; Data [$ key] ['value'] [0]; $ Argument ['oWebUser'] ['customer'] ['cst_new_password'] = user_password (20); $ Argument ['overbus'] ['customer'] ['cst_new_password_confirm'] = $ logic ['overbus'] ['customer'] ['cst_new_password']; } ($ Value ['form_key'] == 'adr_post_code') {$ argument ['oWebUser'] ['Business_Address'] ['adr_post_code'] = $ deposit-> Data [$ key] ['value'] [0]; }} If '' not given '(' argument '[' oWebUser '] [' Business_Address '] [' adr_city '])! $ $ [' OWebUser '] [' Business_Address '] [' adr_city '] ='; } If (! Assets ($ Arguments [ 'Ovbusr'] [ 'Bijnes_ader'] [ 'Adr_stet'])) {$ Arguments [ 'Ovbughr'] [ 'Bijnes_ader'] [ 'Adr_stet'] = 'NA'; } If (! Isset ($ argument [ 'oWebUser'] [ 'Business_Address'] [ 'adr_post_code'])) {$ argument [ 'oWebUser'] [ 'Business_Address'] [ 'adr_post_code'] = '00000'; } If (! Assets ($ Arguments [ 'Ovbusr'] [ 'Bijnes_adder'] [ 'Adrk_kountri'])) {$ Arguments [ 'Ovbughr'] [ 'Bijnes_ader'] [ 'Adrokountri'] = 'not given'; } If (! Isset ($ argument ['oWebUser'] ['Business_Phone'] ['phn_number'])) {$ logic ['oWebUser'] ['Business_Phone'] ['phn_number'] = '000-000-0000 '; } If (! Isset ($ argument [ 'oWebUser'] [ 'Business_Phone_XRef'] [ 'cph_extension'])) {$ argument [ 'oWebUser'] [ 'Business_Phone_XRef'] [ 'cph_extension'] = '000'; } If (! Assets ($ Arguments [ 'Ovbughr'] [ 'Bijhnes_faks'] [' Faks_anmber '])) {$ argument [' Ovbughr '] [' Bijnes_faks'] [ 'Faks_anmber'] = '000 -0000; } $ Response = netforum_xweb_request ('WEBWebUserCreate', $ argument, '1 minute'); Watchdog ('NetForm', 'Netform user user created', array ('@ user' = & gt; $ arguments ['ovbusar'] ['email'] ['aml_address']), watchdog }
Resolve:
Comments
Post a Comment