openscholar/openscholar — pull request #4494 by baisong (2013-11-18 21:41:41+00:00)
Title: user login w site/register as destination for custom-domain subsite add links

#4436

#### Changes

* Now, when an "Add subsite" link is generated with a parent vsite specified, an additional modification may apply.
* Only in the case where the parent site has a custom domain
* The href for the link for vsite 123 will look like: `http://basedomain.com/user/login?destination=/site/register%3Fparent%3D123`
* If the user is not logged in on the base domain (most likely), then they are first shown the login screen, then are redirected to `/site/register?parent=123`
* If the user is already logged in on the base domain (less likely), then they are immediately redirected to `/site/register?parent=123`