Last active
October 6, 2016 17:12
-
-
Save dlundgren/716397756bb01fe225adb56e8df81c15 to your computer and use it in GitHub Desktop.
Change a google user password
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// composer require --no-dev google/apiclient | |
// composer require --no-dev google/apiclient-services | |
require_once __DIR__ . '/vendor/autoload.php'; | |
$config = [ | |
// configure stuff here for Google_Client | |
]; | |
$dir = new Google_Service_Directory(new Google_Client($config)); | |
$user = $dir->users->get($username); | |
$user->setPassword($newpassword); | |
$dir->users->update($username, $user); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment