I'm only using lampp to test and develop a local version of my hosted website.
The link you provided certainly starts lampp but it does it for all users and only at boot-up time. So, if user2 gets on the pc first, he can stop lampp. Then, when user1 logs in, he can't use lampp without doing 'sudo /opt/lampp/lampp start' in terminal.
Ideally, the script I am looking for will only start lampp when user1 logs in.