Forum: Radiant CMS multi_site extension and unique login names

Announcement (2017-05-07): is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see and for other Rails- und Ruby-related community platforms.
Aditya Chadha (Guest)
on 2008-11-28 01:21
(Received via mailing list)
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.



Aditya (
Joe Van D. (Guest)
on 2008-12-01 21:25
(Received via mailing list)
I'd modify the radiant code.

This topic is locked and can not be replied to.