implemented Profile should automatically be made public if user has a pu...

...blished a public collection
move profile visibility  code as  method to save the profile visibility status and reuse everywhere.