+ // If GoogleApps is enabled, and the user did choose to use synchronized passwords,
+ // and if the (stupid) user has decided to user /register/success another time,
+ // updates the Google Apps password as well.
+ if ($globals->mailstorage->googleapps_domain) {
+ require_once 'googleapps.inc.php';
+ $account = new GoogleAppsAccount(S::v('uid'), S::v('forlife'));
+ if ($account->active() && $account->sync_password) {
+ $account->set_password($password);
+ }
+ }
+