An Edinburgh mental health support worker has been placed on the sex offenders register after he was caught in an undercover police paedophile sting.