I was just wondering if the way in which I am passing variables to different objects is the best way of doing things. So I have a User class which handles all of the information to do with the session. Within that user class is a variable (private) called isloggedon which is a bool set at false by default. Ideally I need to pass that variable onto the usermanage class so I can allow a logged on user to do things such as make new posts. Here is how I'm doing it at the moment...
$user = new User();
$userManage = new UserManage($user->checkLoggedOn());
So as you can see I have an instance of user. Within the user class I have a method which returns the isloggedon variable (checkLoggedOn()) so that within the user manage it knows whether the user is logged on or not.
Please put my mind at ease and tell me whether it is the best approach.
Thanks a lot