Check for this line then:
You know for guest, the variable $userstatus['canlevel'] is neither yes or no, it is an empty string that does not exist.
PHP:
$userstatus['canlevel'] == "yes"
You know for guest, the variable $userstatus['canlevel'] is neither yes or no, it is an empty string that does not exist.