Update:

I realised that some of the stuff in the script refers to citrix users. This script is pretty advanced, and I'm way out of knowledge on editing it.. OMG \:\)

Any beginner advices?