LiveUser
[ class tree: LiveUser ] [ index: LiveUser ] [ all elements ]

Source for file admin_example_mdb2.php

Documentation is available at admin_example_mdb2.php

  1. <?php
  2. // $Id: admin_example_mdb2.php,v 1.11 2004/06/19 18:04:46 arnaud Exp $
  3. require_once 'config_mdb2.inc.php';
  4. require_once 'LiveUser/Admin.php';
  5. $increment time();
  6.  
  7. $admin = new LiveUser_Admin($conf'FR');
  8.  
  9. $custom = array(
  10.     'name'  => 'asdfMDB22',
  11.     'email' => 'fleh@example.comMDB23'
  12. );
  13. $user_id $admin->addUser('johndoe' $increment'dummypass'nulltruenullnullnull$custom);
  14. echo 'Created Perm User Id ' $user_id '<br />';
  15.  
  16. if (MDB2::isError($user_id)) {
  17.     var_dump($user_id);
  18. }
  19.  
  20. if (!MDB2::isError($user_id&& $user_id > 2{
  21.     $echo_user_id $user_id - 2;
  22.     $admin->removeUser($echo_user_id);
  23.     echo 'Removed Perm User Id ' $echo_user_id '<br />';
  24. }
  25.  
  26. if (!MDB2::isError($user_id&& $user_id > 1{
  27.     $custom = array(
  28.         'name'  => 'asdfMDBUpdated22',
  29.         'email' => 'fleh@example.comMDBUpdated22'
  30.     );
  31.     $update_id $user_id - 1;
  32.     $admin->updateUser($update_id'johndoe' $increment'dummypass'nulltruenullnull$custom);
  33.     echo 'Updated Perm User Id ' $update_id '<br />';
  34. }
  35.  
  36. $foo $admin->getUser($user_id);
  37. if (empty($foo)) {
  38.     echo 'No user with that Perm ID was found ' $user_id;
  39. else {
  40.     print_r($foo);
  41. }
  42. echo '<br />';
  43.  
  44. $filters = array(
  45.     'email' => array('name' => 'email''op' => '=''value' => 'fleh@example.comMDBUpdated22''cond' => 'AND''type' => 'text'),
  46.     'name'  => array('name' => 'name',  'op' => '=''value' => 'asdfMDBUpdated22''cond' => '''type' => 'text')
  47. );
  48. $foo1 $admin->searchUsers($filters);
  49. echo 'These Users were found: <br />';
  50. print_r($foo1);
  51. ?>

Documentation generated on Mon, 11 Mar 2019 13:56:15 -0400 by phpDocumentor 1.4.4. PEAR Logo Copyright © PHP Group 2004.