Posted By

JohnnyGamba on 01/20/11


Tagged

drupal


Versions (?)

Update a user


 / Published in: PHP
 

  1. <?php
  2. // load user object
  3. $existingUser = user_load('USERID');
  4.  
  5. // update some user property
  6. $existingUser->some_property = 'blah';
  7.  
  8. // save existing user
  9. user_save((object) array('uid' => $existingUser->uid), (array) $existingUser);
  10. ?>

Report this snippet  

You need to login to post a comment.