Skip to content

Commit 783063c

Browse files
authored
Change FirebaseUser.IsValid() to a method (#707)
Make this consistent to `Credential.IsValid()`
1 parent f792497 commit 783063c

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

auth/src/swig/auth.i

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -880,10 +880,10 @@ static CppInstanceManager<Auth> g_auth_instances;
880880
// Update the cached user proxy for this object.
881881
private FirebaseUser UpdateCurrentUser(FirebaseUser proxy) {
882882
lock (appCPtrToAuth) {
883-
if (proxy == null || !proxy.IsValid) {
883+
if (proxy == null || !proxy.IsValid()) {
884884
// If there is no current user, remove the cached proxy.
885885
currentUser = null;
886-
} else if (currentUser == null || !currentUser.IsValid) {
886+
} else if (currentUser == null || !currentUser.IsValid()) {
887887
// If no proxy is cached, cache the current proxy.
888888
currentUser = proxy;
889889
} else {
@@ -1371,7 +1371,7 @@ static CppInstanceManager<Auth> g_auth_instances;
13711371
public FirebaseUser User {
13721372
// Both FirebaseAuth.CurrentUser and AuthResult.User returns null if the
13731373
// user is invalid.
1374-
get { return (UserInternal != null && UserInternal.IsValid) ? UserInternal : null; }
1374+
get { return (UserInternal != null && UserInternal.IsValid()) ? UserInternal : null; }
13751375
}
13761376
%}
13771377
%typemap(csclassmodifiers) firebase::auth::AuthResult "public sealed class";
@@ -1883,7 +1883,7 @@ static CppInstanceManager<Auth> g_auth_instances;
18831883
std::vector<firebase::auth::UserInfoInterface>, ProviderData, provider_data);
18841884
%attributestring(firebase::auth::User, std::string, ProviderId, provider_id);
18851885
%attributestring(firebase::auth::User, std::string, UserId, uid);
1886-
%attribute(firebase::auth::User, bool, IsValid, is_valid);
1886+
%rename(IsValid) firebase::auth::User::is_valid;
18871887

18881888
// Change the fields on UserInfoInterface and inheritors to use Properties.
18891889
%attributestring(firebase::auth::UserInfoInterface, std::string, UserId, uid);

0 commit comments

Comments
 (0)