有効な Google アカウントに対応していないメールアドレスを使用して User::__construct() が呼び出された場合、オブジェクトは作成されても実際の Google アカウントには対応しません。こうしたケースは、オブジェクトが保存された後に、特定のメールアドレスを使用して Google アカウントを作成する場合にも起こります。User 値の作成時に Google アカウントを表していないメールアドレスがその値に含まれていると、その User 値は実際のユーザーを表す User 値とは一致しません。
有効なユーザーの User オブジェクトにより、そのユーザーの一意の ID 値が得られます。この値はそのユーザーがメールアドレスを変更しても変わりません。この ID(string 値)は getUserId() メソッドによって返されます。
[[["わかりやすい","easyToUnderstand","thumb-up"],["問題の解決に役立った","solvedMyProblem","thumb-up"],["その他","otherUp","thumb-up"]],[["わかりにくい","hardToUnderstand","thumb-down"],["情報またはサンプルコードが不正確","incorrectInformationOrSampleCode","thumb-down"],["必要な情報 / サンプルがない","missingTheInformationSamplesINeed","thumb-down"],["翻訳に関する問題","translationIssue","thumb-down"],["その他","otherDown","thumb-down"]],["最終更新日 2025-03-13 UTC。"],[[["The `User` class represents a unique user, and two equal instances signify the same user."],["`UserService::getCurrentUser()` retrieves the `User` instance for the current user, regardless of the authentication method."],["A `User` instance can be created from an email address, but it may not correspond to a valid Google account."],["The `getUserId()` method of a `User` object provides a unique ID that remains consistent even if the user's email changes."],["This API is only for first-generation runtimes, and a migration guide is available for updates to PHP 7/8 runtimes."]]],[]]