Love Fuel?    Donate

FuelPHP Forums

Ask your question about FuelPHP in the appropriate forum, or help others by answering their questions.
Noob NinjAuth Question
  • Please forgive my noobness here.

    I'm just getting started here doing some framework research, and from all that I can tell, FuelPhP is the best option for a project I have coming up.

    I'm making my way around, and starting to get my mind wrapped around how Fuel structures.

    I was able to theme some site pages by using [public $template = 'template_banner';] in the pages controller, and that worked fine.

    But I'm having trouble identifying where/how to do something similar for the NinjAuth package?

    Any help would be appreciated.

    ChadStrat
  • I assume you mean when you want to use ninjauth/classes/controller?

    That controller extends \Controller, and therefor doesn't have any template support. The best option would probably be not to use that controller, but copy it to your app (don't forget the view), change it to extend Controller_Template, and have it use your template instead of just returning a view.
  • well, I followed this http://philsturgeon.co.uk/blog/2011/09/ninjauth-social-integration-php

    so..I have an Auth Controller, and I set the template in that, but it doesn't seem to have any effect.

    ChadStrat
  • No, because the Auth controller extends the Ninjauth controller, which in turn extends Controller. And not Controller_Template.

    So you can't use templates in any controller that does this, which is why I suggested not to do it this way, but create your own controller.

    As an example, have a look at https://github.com/fuel/depot/tree/1.0/develop/fuel/modules/users/classes/controller, it uses it's own controllers for all auth functions, but still uses Ninjauth in the backend for github, twitter, facebook, etc.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

In this Discussion