I feel like a dummy..... I posted and issue, somewhat like this, some
time ago and thanks to api support, it was resolved, but now when I
try to do something else, I run into another issue....

I'm using the provided provisioning php code to create accounts, but I
get this error message:

Attempting to get token...
Obtained token asome-things-go-here-asd-123

Creating Username1...
PHP Fatal error:  Call to undefined function CreateAccount() in /root/
provisioning-api-php/php/create_account.php on line 26
xargs: /usr/bin/php: exited with status 255; aborting


And here is my code:



::::::::::::::
create_account.php
::::::::::::::
  #!/usr/bin/php4 -q
<?php

  require_once("auth.php");
  require_once("account.php");
  require_once("alias.php");
  require_once("mailing.php");

  /* Example user name, alias name and mailing list name for the demo.
*/
  $source_data = "test_create_users_list.txt";
  $user_name = $argv[1];
  $first_name = trim(`more '$source_data' |grep '$user_name' |awk
'{print $1}'`);
  $last_name = trim(`more '$source_data' |grep '$user_name' |awk
'{print $2}'`);
  $user_pass = trim(`more '$source_data' |grep '$user_name' |awk
'{print $4}'`);


//print "Username: $user_name, First Name: $first_name, Last Name:
$last_name, Password: $user_pass \n";

  /* Get an administrator token. */
  print "Attempting to get token...\n";
  $token = GetAuthToken("[EMAIL PROTECTED]", "adminpasswd", "", "");
  print "Obtained token $token\n\n";

  /* Create a new account. */
  print "Creating " . $user_name  . "...\n";
print CreateAccount($token, "mydomain", $first_name, $last_name,
$user_name,
$user_pass) . "\n";

  ?>


::::::::::::::
test_create_users_list.txt
::::::::::::::
Firstname1 Lastname1 Username1 Password1
Firstname2 Lastname2 Username2 Password2
Firstname3 Lastname3 Username3 Password3
Firstname4 Lastname4 Username4 Password4
Firstname5 Lastname5 Username5 Password5
...
...


::::::::::::::
get_users_jnum_test.sh
::::::::::::::
#!/bin/bash
more user_list_test.txt | gawk '{print $3}' | xargs -l1 /usr/bin/php
create_account.php



Thanks for any help, once again.

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Google Apps APIs" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/google-apps-apis?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to