php warning message Undefined variable
===

    if ((!in_array("9", $settingid)) || ($username1 == $username2) && ($username_viewed_by_other2 != "-view-by-other-people")) { //start function }

now warning message appear because $username1 is not set yet. 

I cannot use `if(isset($username1)){ //start function }` because the function need to be carried out when $username1 is not set, how to fix this conflict situation?