Multi_site extension and unique login names

Hi folks,

Just playing around with the multi_site extension and noticed that the
login field in the users table seems to have a unique validation as
well as a unique constraint enforced by an index. Not quite sure what
the best to get around this is, but I would imagine that if you were
hosting multiple sites you would want the logins to be scoped to site?

I’m not quite sure what the cleanest way of overriding validations is
but one way could be to add an :if to the
validates_uniquness_of :login in user.rb and then override the method
that the if calls in the extension. Another way would be to use a
custom validation. We would obviously have to replace the unique index
on login with a unique index on login, site_id

Unfortunately, I can’t see a way of leaving the Radiant code alone…
the validation needs to change.

Thoughts?

Cheers,
Aditya


Aditya (http://aditya.sublucid.com)

I’d modify the radiant code.

Joe