Updating DX Auth - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20) +--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23) +--- Thread: Updating DX Auth (/showthread.php?tid=40565) Pages:
1
2
|
Updating DX Auth - El Forum - 04-12-2011 [eluser]austintbiggs[/eluser] I've recently taken on the task of updating a library to allow it to run on CI 2.0.2 [it was written for CI 1.7.0]. From what I've gathered for controllers and models I just need to add the prefix 'CI_' which I've done. what other changes would effect the code that I should watch out for / modify? I keep receiving the same error Quote:Fatal error: Call to undefined method CI_Controller::CI_Controller() in /controllers/auth.php on line 12 auth.php Code: <?php Any and all help is appreciated! [: Updating DX Auth - El Forum - 04-12-2011 [eluser]Nick_MyShuitings[/eluser] Update 10/11/2010: Remember to do this for Controllers too. Instead of Foo extends Controller, you must now write Foo extends CI_Controller and all parent::Controller() calls must be changed to parent::__construct()! From http://philsturgeon.co.uk/news/2010/05/upgrading-to-codeigniter-2.0 That should fix that error at least. Updating DX Auth - El Forum - 04-12-2011 [eluser]austintbiggs[/eluser] Thanks, that fixed everything! Updating DX Auth - El Forum - 04-17-2011 [eluser]k2zs[/eluser] I'm getting this error after fixing the above mentioned: Fatal error: Call to undefined method CI_Loader::plugin() in /srv/www/htdocs/staging/staging.nyqp.org/application/libraries/DX_Auth.php on line 1233 I copied the "plugins" directory to my application folder but I believe CI 2.0 no longer supports plugins, where should the plugin go? Updating DX Auth - El Forum - 04-17-2011 [eluser]Nick_MyShuitings[/eluser] read the link I posted above for Phil... plugins -> helpers with some renaming to do. Updating DX Auth - El Forum - 04-17-2011 [eluser]k2zs[/eluser] Well, I had it working but it's not that great of an app. I was able to log in once and tried setting custom permissions but they always reported that admin had no permissions. When I did an "/auth/logout/" I can no longer log in.... Is there an authentication library that works well with CI 2.0.2? Updating DX Auth - El Forum - 04-17-2011 [eluser]InsiteFX[/eluser] Change all your Constructors. Code: // wrong! InsiteFX Updating DX Auth - El Forum - 04-17-2011 [eluser]Nick_MyShuitings[/eluser] Tank Auth runs out of the box. I'm running a heavily customized version of Tank myself on all my projects. Updating DX Auth - El Forum - 04-17-2011 [eluser]k2zs[/eluser] [quote author="InsiteFX" date="1303077672"]Change all your Constructors. Code: // wrong! InsiteFX[/quote] Did all that and like I said I had it working for a short time until I logged out and tried logging back in. Now it won't accept the default password... I did try editing roles and checked "edit" and "delete" for "admin" which weren't checked by default. Updating DX Auth - El Forum - 04-17-2011 [eluser]k2zs[/eluser] [quote author="Nick_MyShuitings" date="1303078071"]Tank Auth runs out of the box. I'm running a heavily customized version of Tank myself on all my projects.[/quote] Thanks, I think I'll give that a try |