#1
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
Topic Starter
  • ThisBytes5
  • Rank: YAF Forumling
  • Reputation:
    Neutral
    54.4%
  • Joined: 04/03/2017
  • Posts: 7
#2
The only way would be to modify the source code, your use case can not be handled via a setting
UserPostedImage
  • tha_watcha
  • Rank: YAF.NET Project Lead
  • Reputation:
    Exalted
    100%
  • Medals:
    Medal of Honor: Portal Puzzle Master: Portal Puzzle Master for DNNMedal of Honor Key: Given to pillars of the community who are key players in the YAF community and project.DNN Master: DNN Module ManBug Killer Medal of Honor: Medal for being a kick-ass bug killer!Medal of Honor for the Support King: Support King! Amazing asset to the YAF.NET Community.
  • Joined: 06/03/2010
  • Posts: 4,002
  •  Germany
  • Thanks: 74 times
  • Was thanked: 1205 time(s) in 1031 post(s)
#3
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.
Topic Starter
  • ThisBytes5
  • Rank: YAF Forumling
  • Reputation:
    Neutral
    54.4%
  • Joined: 04/03/2017
  • Posts: 7
#4
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
  • tha_watcha
  • Rank: YAF.NET Project Lead
  • Reputation:
    Exalted
    100%
  • Medals:
    Medal of Honor: Portal Puzzle Master: Portal Puzzle Master for DNNMedal of Honor Key: Given to pillars of the community who are key players in the YAF community and project.DNN Master: DNN Module ManBug Killer Medal of Honor: Medal for being a kick-ass bug killer!Medal of Honor for the Support King: Support King! Amazing asset to the YAF.NET Community.
  • Joined: 06/03/2010
  • Posts: 4,002
  •  Germany
  • Thanks: 74 times
  • Was thanked: 1205 time(s) in 1031 post(s)
#5
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:"😉;
Topic Starter
  • ThisBytes5
  • Rank: YAF Forumling
  • Reputation:
    Neutral
    54.4%
  • Joined: 04/03/2017
  • Posts: 7
Users browsing this topic

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