/**
* Checks to see if an ads user is authenticating with OAuth 2 or not.
*
* @param AdsUser $user the AdsUser to test
* @return boolean true if using OAuth 2, false otherwise
*/
public static function IsUsingOAuth2(AdsUser $user)
{
// AdsUser doesn't have ClientLogin information on it, only the subclasses
// do, so we can only check for absence of OAuth 2 here.
return $user->GetOAuth2Info() !== NULL;
}