Announcement

Collapse
No announcement yet.

Hooks & Profile field updation

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • chuanjer
    replied
    Thanks I'll do just that! =)

    Leave a comment:


  • Lynne
    replied
    You might get more help with writing plugins by posting over at vbulletin.org

    Leave a comment:


  • chuanjer
    started a topic Hooks & Profile field updation

    Hooks & Profile field updation

    I've written a plugin-script which is triggererd by usercp_complete .it will then update the Profile_status which is 'field6' in vb Userfield.
    PHP Code:
    $userdata =& datamanager_init('User'$vbulletinERRTYPE_ARRAY); 
    $userdata->set_existing($vbulletin->userinfo);   
    $userdata->set('field6','Yes'); 
    $userdata->pre_save(); 
    if (
    count($userdata->errors) > 0

        
    // Errors occurred. Do not proceed with the save. 
        // You may want to loop through $dataman->errors and  
        // display the results the user. 

    else 

        
    // No errors occurred. 
        // Proceed with the save (see the next step). 
       
    $userdata->save(); 

    Keep getting this error:
    Code:
    [B]Fatal error:[/B] Field [I]field6[/I] is not defined in [I]$validfields[/I] in class [B]vb_datamanager_user[/B] in [B]/includes/class_dm.php[/B] on line [B]485[/B]
    Whats wrong with the code?Thanks!
    Last edited by chuanjer; Thu 17 Jan '08, 9:19pm. Reason: typo

Related Topics

Collapse

Working...
X