PHP scripts register.php:
$compareUser = new User();
$user = new User;
verify.php (executes with a link from register.php, passes two variables to User.php)
User.php
setActive($token, $uid){
$this->username = /????
}
*assuming that User has a username property, which instance of the User class will $this take? $compareUser or $user?
That depends entirely on which object you call setActive() on. You cannot simply write...
You must write one of these two:
In either case,
$thisis whichever object you used to invoke that method. That is, in fact, the exact purpose of the$thisvariable.