Love Fuel?
Donate
About
Forums
Discussions
Login
FuelPHP Forums
Ask your question about FuelPHP in the appropriate forum, or help others by answering their questions.
WanWizard
a.k.a. WanWizard
Discussions
4
Comments
8242
Activity
Login Form not working
If it doesn't fire the form, how did you manage to dump the input method then? inside a form is interpreted differently by different browsers, it's safer to use a input tag with a type="submit". For a tag to submit, it needs a…
Comment by
WanWizard
October 2013
permalink
Login Form not working
check your form.php config file. I suspect you've changed the "form_method" to "GET".
Comment by
WanWizard
October 2013
permalink
Login Form not working
Obvious next step would then be to dump Input::method(). Does it contain what you expect?
Comment by
WanWizard
October 2013
permalink
Trouble with an optional named route parameter
No, the brackets just mean you can refer the it in the target using $1. It's compiled into a standard regex, so you do need to question mark to make it optional.
Comment by
WanWizard
October 2013
permalink
Wrong Validation..?
You made a typo: $new_task_form->add('count_bots', 'Anzahl Bots (maximal '.count(\Bots\Bots::get_all_bots(\Auth::get('owned_bots'), false)).' verfügbar)', array('class' => 'input-small&…
Comment by
WanWizard
October 2013
permalink
ormauth issue
Just setup a test. My user's cache file contains: (Array, 3 elements) ↵ 0 (Array, 1 element) ↵ finance (Array, 1 element) ↵ test (Array, 3 elements) ↵ 0 (String): "view" (4 characters) …
Comment by
WanWizard
October 2013
permalink
Ormauth Admin Scaffold Using Oil
You can use oil refine fromdb:scaffold users --admin to run admin scaffolding instead of scaffolding. It will generate new models, so after this you'll have to change those so that they simply extend the model in Auth (and be empty otherwi…
Comment by
WanWizard
October 2013
permalink
ormauth issue
You're not testing with the admin user that is created by default? Because that has superadmin access by default, so has_access() already returns true. To check the effective permissions, do a Debug::dump() of a Cache::get() of the users permi…
Comment by
WanWizard
October 2013
permalink
FuelPHP 2.0
All I can tell you at the moment is that the goal is that we're going to make that as easy as possible. We all have existing applications too, and we hate migrations effort as much as you do. As 2.0 isn't finished yet, we haven't mad…
Comment by
WanWizard
October 2013
permalink
OrmAuth database structure
Done.
Comment by
WanWizard
October 2013
permalink
Template not found after changing to Fuel 1.7
Why are you changing the core template controller? And if this is your own controller, it's not being used, because the trace says: COREPATH/classes/controller/template.php @ line 40 which in the file you link in is a bracket, so it's no…
Comment by
WanWizard
October 2013
permalink
\Security::check_token on REST api
Use Security::js_fetch_token() in your page. That will introduce the javascript function fuel_csrf_token(), which you can use to fetch the current valid token. Include that in your payload when the page submits the data.
Comment by
WanWizard
October 2013
permalink
Temporal model - What changed between revisions?
In temporal, every revision is "valid", or in other words, there is no validation status. It works based on timestamps (valid-from - valid-to), and if you don't select anything, you'll get the record where the valid-to is null. …
Comment by
WanWizard
October 2013
permalink
OrmAuth database structure
Just verified here, it should indeed be delete_all(). Sorry for the confusion. I'm now going to kick one of my employees, because I stole those lines from his code... ;-)
Comment by
WanWizard
October 2013
permalink
OrmAuth database structure
Ah, wait. 'permissions' is a folder name, containing the cache files per user. Could be you need to do: \Cache::delete_all(\Config::get('ormauth.cache_prefix', 'auth') . '.permissions');
Comment by
WanWizard
October 2013
permalink
Invalid Rule
As you notice in the error, it doesn't complain about "required", it complains about the other two. Problem here is that your rule definition is wrong, try $new_task_form->add('count_bots', 'Anzahl Bots (maximal 2…
Comment by
WanWizard
October 2013
permalink
Temporal model - What changed between revisions?
The Orm will be rewritten for Fuel v2, which will have a lot more flexible architecture. Just discussed it with Steve (who's doing ORM), and he doesn't see it at as very difficult to implement.
Comment by
WanWizard
October 2013
permalink
OrmAuth database structure
You flush the cache of a single user like so: // flush the cached permissions, they might have been changed \Cache::delete(\Config::get('ormauth.cache_prefix', 'admin').'.permissions.user_'.$user->id); You flush al…
Comment by
WanWizard
October 2013
permalink
OrmAuth database structure
Don't blame the framework for not understanding something or for doing something wrong. ;) You only need to flush permissions if you update something, which I assume you would do in an admin interface. You flush permissions for a single user…
Comment by
WanWizard
October 2013
permalink
Temporal model - What changed between revisions?
Afaik that is not currently implemented.
Comment by
WanWizard
October 2013
permalink
Confusion for using namespace
Packages and modules are always in a namespace (equal to the name of the package or the module). Packages can't have controllers, for module controllers the same applies. Either you use "Controller_", or "\\Controller\\", b…
Comment by
WanWizard
October 2013
permalink
Confusion for using namespace
It you decide to namespace your controllers, you need to change the prefix in app/config/config.php from "Controller_" to "Controller\\", as documented here: http://fuelphp.com/docs/general/controllers/base.html#/controller_names…
Comment by
WanWizard
October 2013
permalink
OrmAuth database structure
Does this work? $group = Auth\Model\Auth_Group::find($groupId); unset($group->grouppermission); $group->save();
Comment by
WanWizard
October 2013
permalink
OrmAuth database structure
The relation between group-permission and role-permission isn't a standard many-many, that relation is only provided for quick lookups, but should be used read-only. You add permissions using grouppermission and rolepermission, so the action f…
Comment by
WanWizard
October 2013
permalink
OrmAuth database structure
You only need to flush groups if you changed a group (added/modified/deleted), not if you only changed permissions. Same for roles. If you delete a group or a role, you should flush the permissions, as effective rights may have changed. And after a…
Comment by
WanWizard
October 2013
permalink
More Comments
Howdy, Stranger!
It looks like you're new here. If you want to get involved, click one of these buttons!
Sign In
Apply for Membership
About
Username
WanWizard
Joined
January 2011
Visits
2,373
Last Active
8:38PM
Roles
Administrator