Welcome Guest, Not a member yet? Register   Sign In
Custom Auth library is ignoring extended Config Library
#1

[eluser]nmormino[/eluser]
ok. This is strange for me I'd really appreciate it if anyone had an idea of what was going on.

I wrote a custom authentication library. If someone makes an attempt to go into a secure area and they are not logged in, they are redirected to a login page. I'm building a shopping cart right now, so I need SSL support. In order to add SSL support, I followed a lot of the advice given in these forums previously.

I extended CI_Config with MY_Config and added a secure_site_url function (My_url_helper has a secure_redirect function that uses it). This function will work if used in a controller, but if I try to use it from within my custom Auth library, I get this error

Call to undefined method CI_Config:Confusedecure_site_url()

If I just add the secure_site_url directly to the config library, I do not get this error (I do not want to do this, because I want to be able to easily upgrade to new versions of Code Igniter as they come out without reediting core files). I can only assume that the config library is not dynamically extending to the MY_Config library automatically when used within another library.

I would appreciate any suggestions,

Thanks!
#2

[eluser]Unknown[/eluser]
I am stuck with the same problem -- it started to happen right after I updated to CI 1.7.2. So far I have not found the solution.
#3

[eluser]nmormino[/eluser]
Umm... Looks like nobody cares about this problem. so.. Bump?
#4

[eluser]nmormino[/eluser]
ok. this wasn't working for me due to a stupid typographical error... DOH!
#5

[eluser]bretticus[/eluser]
nevermind, you seem to have solved it.




Theme © iAndrew 2016 - Forum software by © MyBB