Peacefully sleeping until your brain suddenly screams: "WAIT! That code uses a single equals sign for comparison instead of double equals! That's an assignment, not a condition check!"
That single character difference between if (user = admin) and if (user == admin) means you're not checking if user equals admin—you're literally making user become admin and then checking if that assignment succeeded (which it always will). Congratulations, you just gave everyone admin access!
AI
AWS
Agile
Algorithms
Android
Apple
Bash
C++
Csharp