YAFLogo

ThisBytes5
  • ThisBytes5
  • 54.4% (Neutral)
  • YAF Forumling Topic Starter
7 years ago
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

Sponsor
tha_watcha
  • tha_watcha
  • 100% (Exalted)
  • YAF.NET Project Lead 🤴 YAF Version: 4.0.1 BETA
7 years ago
The only way would be to modify the source code, your use case can not be handled via a setting
ThisBytes5
  • ThisBytes5
  • 54.4% (Neutral)
  • YAF Forumling Topic Starter
7 years ago
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
  • tha_watcha
  • 100% (Exalted)
  • YAF.NET Project Lead 🤴 YAF Version: 4.0.1 BETA
7 years ago

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.

Originally Posted by: ThisBytes5 

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

ThisBytes5
  • ThisBytes5
  • 54.4% (Neutral)
  • YAF Forumling Topic Starter
7 years ago
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().UseSSLToLogIn

// ? YafBuildLink.GetLinkNotEscaped(ForumPages.login, returnUrl)

// : YafBuildLink.GetLinkNotEscaped(ForumPages.login, true, returnUrl)

// .Replace("http:", "https:");