Recent Topics

1 Aug 02, 2008 23:44    

My b2evolution Version: 2.x

Hello, this is my first post, please forgive me if I am not in the right forum. This is more of an idea as well as a request.

I am working on a project where i am plugging b2evolution into symfony. I am using symfony for authentication, and a myriad of other things, and need b2evolution for multi-user blog support. The plugin system is great, but after everything is said and done, there is no plugin hook for "pre" login, essentially, changing the URL generated of the login link in b2evo.

So i basically had to change a core file because there isn't this hook. The reason for this is because if someone is browsing a blog on b2evo, and they click login, i want them to be using the symfony login page, i don't want to push all the symfony traffic to b2evo as symfony is serving as the master table of users. And I don't want to code 2 different login forms.

So, the file


/b2evo/inc/users/model/_user.funcs.php

I modified the function


get_login_url() 

The change was simple, just the last line of the function like so:


        //return $htsrv_url_sensitive.'login.php'.$redirect;
        return 'http://'.$_SERVER["SERVER_NAME"].'/login';

So I guess if there was a hook like "BeforeLoginAttempt" that would allow you to specify an alternate URL for the login page, that would be cool, wouldn't have to mod a core file.

Thank you for reading!


Form is loading...

Social CMS – This forum is powered by b2evolution CMS, a complete engine for your website.