Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8895581
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T23:49:03+00:00 2026-06-14T23:49:03+00:00

I have a small script to force users on our Google Apps domain to

  • 0

I have a small script to force users on our Google Apps domain to change their password at next login. I’m using Zend Framework 1.11.13 but I also get the same results on 1.12.0.

The example for updating users in the google docs ( https://developers.google.com/google-apps/provisioning/#updating_a_user_account ) seems out of date or incorrect as calling updateUser on the client object always returns an undefined method error.

Here is my code:

<?php
set_include_path(implode(PATH_SEPARATOR, array(
    "/var/www/workspace/extlib/zend-framework/library/",
    get_include_path(),
)));
require_once 'Zend/Loader.php';
Zend_Loader::loadClass('Zend_Gdata_ClientLogin');
Zend_Loader::loadClass('Zend_Gdata_Gapps');

$client = Zend_Gdata_ClientLogin::getHttpClient("removed", "removed", Zend_Gdata_Gapps::AUTH_SERVICE_NAME);
$gdata = new Zend_Gdata_Gapps($client, 'domain.com');
$userEntry = $gdata->retrieveUser("a.username");
$userEntry->getLogin()->setChangePasswordAtNextLogin(true);
$gdata->updateUser("a.username", $userEntry);

And the error I get is:

PHP Fatal error:  Uncaught exception 'Zend_Gdata_App_HttpException' with message 'Expected response code 200, got 500
Internal Error' in /var/www/workspace/extlib/zend-framework/library/Zend/Gdata/App.php:718
Stack trace:
#0 /var/www/workspace/extlib/zend-framework/library/Zend/Gdata.php(219): Zend_Gdata_App->performHttpRequest('PUT', 'https://apps-ap...', Array, '<atom:entry xml...', 'application/ato...', NULL)
#1 /var/www/workspace/extlib/zend-framework/library/Zend/Gdata/App.php(934): Zend_Gdata->performHttpRequest('PUT', 'https://apps-ap...', Array, '<atom:entry xml...', 'application/ato...')
#2 /var/www/workspace/extlib/zend-framework/library/Zend/Gdata/Gapps.php(272): Zend_Gdata_App->put(Object(Zend_Gdata_Gapps_UserEntry), 'https://apps-ap...', NULL, NULL, Array)
#3 /var/www/workspace/extlib/zend-framework/library/Zend/Gdata/App.php(1025): Zend_Gdata_Gapps->put(Object(Zend_Gdata_Gapps_UserEntry), 'https://apps-ap...', NULL, NULL, Array)
#4 /var/www/workspace/extlib/zend-framework/library/Zend/Gdata/Gapps.php(1005): Zend_ in /var/www/workspace/extlib/zend-framework/library/Zend/Gdata/App.php on line 718

I’ve added in some debug code here and there and the user definitely gets loaded ok so it doesn’t appear to be a permissions error or networking error as the initial request works fine. The error comes about from when I try to call updateUser.

Any help would be really appreciated!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-14T23:49:05+00:00Added an answer on June 14, 2026 at 11:49 pm

    I have found out that the problem was actually permissions based.

    The user I created to manage the changing of passwords although had permissions to reset passwords, it was unable to reset passwords for users which had Super Admin privileges because it only had Admin permissions.

    Maybe a more appropriate error message is required here?

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a small script which im using to test PHP mail(), as below:
I have a small script we're using to read in a CSV file containing
I have a small script, which is called daily by crontab using the following
I have a small python script which invokes an external process using subprocess .
I have a small script that checks a large list of domains for their
I have a small css script that force <a> tag word-wrap in a div.
I have a small script that redirects users to main site if they come
I have small script in bash, which is generating graphs via gnuplot. Everything works
I have a small script where you can drag the link, but I also
I have a small script and want to detect the script version from admin

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.