Skip to content

Commit a0de4f5

Browse files
authored
Merge pull request #421 from firebase/peterfriese/kotlin-let-it
Use implicit name instead of `user`
2 parents a80b35a + f8e78be commit a0de4f5

File tree

1 file changed

+7
-7
lines changed
  • auth/app/src/main/java/com/google/firebase/quickstart/auth/kotlin

1 file changed

+7
-7
lines changed

auth/app/src/main/java/com/google/firebase/quickstart/auth/kotlin/MainActivity.kt

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -55,17 +55,17 @@ abstract class MainActivity : AppCompatActivity() {
5555
val user = Firebase.auth.currentUser
5656
user?.let {
5757
// Name, email address, and profile photo Url
58-
val name = user.displayName
59-
val email = user.email
60-
val photoUrl = user.photoUrl
58+
val name = it.displayName
59+
val email = it.email
60+
val photoUrl = it.photoUrl
6161

6262
// Check if user's email is verified
63-
val emailVerified = user.isEmailVerified
63+
val emailVerified = it.isEmailVerified
6464

6565
// The user's ID, unique to the Firebase project. Do NOT use this value to
6666
// authenticate with your backend server, if you have one. Use
6767
// FirebaseUser.getToken() instead.
68-
val uid = user.uid
68+
val uid = it.uid
6969
}
7070
// [END get_user_profile]
7171
}
@@ -533,12 +533,12 @@ abstract class MainActivity : AppCompatActivity() {
533533
// [START games_get_user_info]
534534
val user = auth.currentUser
535535
user?.let {
536-
val playerName = user.displayName
536+
val playerName = it.displayName
537537

538538
// The user's Id, unique to the Firebase project.
539539
// Do NOT use this value to authenticate with your backend server, if you
540540
// have one; use FirebaseUser.getIdToken() instead.
541-
val uid = user.uid
541+
val uid = it.uid
542542
}
543543

544544
// [END games_get_user_info]

0 commit comments

Comments
 (0)