We would like to access the "USERID" as well as the Email address of the currently logged in user.
Specfically we need pass this information thru the URL on the Create new Page in the Admin page settings section to make that part of the main navigation
something along those lines, is this possible or are there any other ideas out there that will allow for this?
I don't really understand your question or what you are trying to do, your questions don't really make sense to me.
For the current logged in user you can get his LoginName (its just labeled UserID on the login screen or hist actual UserID which is an integer from code as follows:
SiteUser currentUser = SiteUtils.GetCurrentSiteUser();
string loginName = currentUser.LoginName;
int userId = currentUser.UserID;
I don't know what you mean about passing it from Page Settings or making it part of navigation, you should not be modifying mojoPortal code.
I cannot imagine why you would need to pass anything to a custom login page for a user who is already logged in and passing things like loginname in the query string would not be good security, the main reason to use LoginName (ie it is what users use to login when Use Email for Login is NOT checked in Site Settings and the only benefit of using that is that it is less guessable than email).
Hope that helps,
Thanks Joe, what I am trying to do is avoid the user from needing to login to another system of ours. We have a proposal creation system that the staff and advisors use and we wanted to add that to the navigation of the mojoportal site we run. For example XYZ Proposal would then link to our proposal system and allow for them to access it so long as they were already logged into mojoportal. We were hoping to do that with a session variable, reading in a cookie or some other means to treat it as a single sign on. Does that make more sense?
Are there any ideas out there to accomplish something like this without the modification of the mojo portal code base?
If your other app is running as an IIS application in a folder beneath a root site running mojoPortal and in the same domain then you should be able to access cookies between them, though you won't be able to read the authentication cookie from mojoPortal in the sub app since it is encrypted using the machine key. You could potentially set an extra cookie by implementing a custom user sign in event handler in mojoPortal, and then read the custom cookie in the sub app and use that to log them in to the sub app.
I don't know if you can share session state between them, I definitely would not implement something that does an automatic login based on a query string param as that would be very insecure.