Love Fuel?    Donate

FuelPHP Forums

Ask your question about FuelPHP in the appropriate forum, or help others by answering their questions.
ORM, Fieldset and SimpleAuth
  • I wasn't sure which area to post this so I've put it under general. If I'm using the ORM $_properties to generate my fieldset, and am using SimpleAuth to authenticate my users, I can see a potential problem which I am wondering if it has been considered before I end up changing my aspirations or having to write my own Auth package which uses ORM. The scenario is this, for example: I want my User registration form to contain a first name, last name and date of birth field. Using SimpleAuth, this will go into the profile fields column. However, to accurately reflect the table, my Model_Users will need to contain a profile_fields property which will be generated by the fieldset. I can set it to not display on forms, thus eliminating that problem. However, I then have the issue of my custom fields. I could put these in in the model properties, but then I will get field not found errors. To overcome this, do I need to specifically add the extra fields like I have to the form submit button (which doesn't seem to be generated when I build the fieldset)? Would this be the preferred method or is there another way that I am not thinking about, or do I need to create a new Auth package to deal with this?
  • Check our fuel depot repo. The admin module contains a users section that does just this. It uses an ORM model to access SimpleAuth user data, and uses the profile_fields to store the users full name.
  • Thanks. I hadn't seen that in there, I'll give it a whirl!
  • There seems to be a problem with the Fuel Depot in that the Theme module is missing as a get an error when I try to view the site.
  • The staging site does an automatic sync with the repo. Sometimes it needs a bit of help, for example when updating submodules or running migrations. It should be up again (but you won't be able to see the admin as a normal user). After login you should be able to change your profile, which contains the profile field "full_name" as well.
  • What is this Fuel Depot mentioned? I've read through all the docs and the sites and searched github but I can't find anything that references a Fuel Depot. I'd love to give it shot.
  • Note that this is very much a work-in-progress. But it's going to be a community web app for documentation, api docs, code snippets, how-to's, tutorials, screencasts, and what have to. And the official FuelPHP package repository. We've decided to put it on github so it can serve as an example application as well.
  • Cool. I'll check it out. I'm looking forward to helping build this framework out after I familiarize myself with it a little more. So far it's been fantastic and building apps with it has been very fast.

Howdy, Stranger!

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

In this Discussion