ThisBytes5
  • Posts: 7
  • Joined: 04/03/2017
I have YAF working with my custom login, but I am not able to figure out how to get the login link to go to my custom login page.

I have set AllowLoginAndLogoff = false in the config, but that just turns off login even though I have the custom login url set. When I go to the forum not logged in I get the following message:

Welcome Guest! You can not login or register.

Is there a way to keep the login link, but have it go to my login page?

Thanks
tha_watcha
  • Posts: 4044
  • Joined: 06/03/2010
The only way would be to modify the source code, your use case can not be handled via a setting
UserPostedImage
ThisBytes5
  • Posts: 7
  • Joined: 04/03/2017
Thanks for quick reply.

Any chance this, as well as a log off link, could be added to settings in a future version?
Modifying the code worked, did that last night for login, going to have to look at log off this weekend.
tha_watcha
  • Posts: 4044
  • Joined: 06/03/2010
Originally Posted by: ThisBytes5

Thanks for quick reply.

Any chance this, as well as a log off link, could be added to settings in a future version?
Modifying the code worked, did that last night for login, going to have to look at log off this weekend.



Well what you could do is, disable only the register link and keep the login/logoff link.


UserPostedImage
ThisBytes5
  • Posts: 7
  • Joined: 04/03/2017
I've disabled the registration did that first, I've modified the code so that the Header login goes where I want it, but it appears that there are multiple places in the code that shows the login link. I'm now finding and modifying those.

I have to have the login link go to login.mysite.com/... rather than using the built in login of the forums as I'm using Microsofts new B2C implementation. So having a place in the settings where I can set the custom login URL would be a great feature for me.

Thanks again for all the help, I'm CLOSE!


To be clear, I found the code below and commented it out, then used my line to hard code the login page, found it in 3 places:

loginLink.NavigateUrl = "https://login.site.com/account/SignUpSignIn?hostname=Forums";

//!this.Get<YafBoardSettings>().UseSSLToLogIn
// ? YafBuildLink.GetLinkNotEscaped(ForumPages.login, returnUrl)
// : YafBuildLink.GetLinkNotEscaped(ForumPages.login, true, returnUrl)
// .Replace("http:", "https:");
Users browsing this topic
    Similar Topics
    Forum Jump  
    • You cannot post new topics in this forum.
    • You cannot reply to topics in this forum.
    • You cannot delete your posts in this forum.
    • You cannot edit your posts in this forum.
    • You cannot create polls in this forum.
    • You cannot vote in polls in this forum.

    About Us

    The YAF.NET is an open source .NET forum project. YAF.NET is supported by an team of international developers who are build community by building community software.

    Powered by Resharper Donate with PayPal button

    Project Twitter Updates

    Copyright © YetAnotherForum.NET & Ingo Herbote. All rights reserved