Created
July 25, 2020 13:23
-
-
Save fatihhcan/ae067a3adeb479765f69f1ff852fbe42 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
private fun initAuthStateListener(){ | |
mAuthStateListener=object : FirebaseAuth.AuthStateListener{ | |
override fun onAuthStateChanged(p0: FirebaseAuth) { | |
var kullanici=p0.currentUser | |
if (kullanici != null){ | |
if(kullanici.isEmailVerified){ | |
Toast.makeText(this@LoginActivity,"Mail onaylandı giriş yapabilirsiniz", Toast.LENGTH_SHORT).show() | |
var intent=Intent(this@LoginActivity,MainActivity::class.java) | |
startActivity(intent) | |
finish() | |
}else{ | |
Toast.makeText(this@LoginActivity,"Mail adresinizi onaylamadan giriş yapamazsınız", Toast.LENGTH_SHORT).show() | |
} | |
} | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment