Profile id is not always the same as user_id

This fixes a bug with unique fields not validating correctly when the profile id and the user id go out of sync.
Fixing issue where unique validation fails if profile id != user id
Merge pull request #2256 from chrisnharvey/patch-1

Profile id is not always the same as user_id