After a couple hours we realize (thanks Jorge Sanchez) that there's
another way to achieve this change:

$service = new Zend_Gdata_Gapps($httpClient, $domain);
$user = $service->retrieveUser($txtUsername);
$user->login->userName = $txtNewUsername;  //You can do it this way
also
$user->save();   //Don't forget to save your changes

NOTE: automatically $txtUsername becomes a $txtNewUsername 's
nickname.

So the problem is now solved. I hope you find it useful.

On 18 feb, 12:59, Hugo Leon <[email protected]> wrote:
> My apologies... I had an error:
>
> $service = new Zend_Gdata_Gapps($httpClient, $domain);
> $user = $service->retrieveUser($txtUsername);
> $user = $service->updateUser($txtUser, $txtNewUsername);  //This is
> wrong
>
> $service = new Zend_Gdata_Gapps($httpClient, $domain);
> $user = $service->retrieveUser($txtUsername);
> $user->updateUser($txtUser, $txtNewUsername);  //I think this is
> correct
>
> But I still have an error "Call to undefined method
> Zend_Gdata_Gapps_UserEntry::updateUser()"
> Zend's Documentation shows this method into its 
> 1.11vhttp://framework.zend.com/apidoc/1.11/and I'm using it.
>
> Do you have any idea of what else is wrong?
>
> Thanks!
>
> On 18 feb, 10:47, Hugo Leon <[email protected]> wrote:
>
> > Hello everyone.
>
> > I'm trying to update a username as the documentation says 
> > inhttp://code.google.com/intl/en/googleapps/domain/gdata_provisioning_a...
>
> > $service = new Zend_Gdata_Gapps($httpClient, $domain);
> > $user = $service->retrieveUser($txtUsername);
> > $user = $service->updateUser($txtUser, $txtNewUsername);
>
> > But Throws an exception "Expected response code 200, got 400 Content
> > is not allowed in prolog."
>
> > I can do a similar task changing the Given Name with success:
>
> > $service = new Zend_Gdata_Gapps($httpClient, $domain);
> > $user = $service->retrieveUser($txtUsername);
> > $user->name->givenName = $txtGivenName;
>
> > I couldn't find an answer so far. I've downloaded the Zend Framework's
> > last version (1.11) but it doesn't work.
>
> > Am I doing something wrong? or is there a problem with the client
> > library?
>
> > Thanks in advance for your help.

-- 
You received this message because you are subscribed to the Google Groups 
"Google Apps Domain Information and Management 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-mgmt-apis?hl=en.

Reply via email to