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
Multiple Auth-Systems? Like Customers via Fron-End and Admins/Mods via Admin-Panel
"multiple_logins" means the same user logged in from multiple browsers, it has nothing to do with what you want. There is no problem solving that with roles and permissions. If the user (a customer in this case) doesn't have a role a…
Comment by
WanWizard
April 2014
permalink
Multiple Auth-Systems? Like Customers via Fron-End and Admins/Mods via Admin-Panel
There was a discussion about this recently, you might want to search for it. As I recall, due to the static nature of a lot of Auth stuff, it was very complex to have two Auth systems running in parallel. It was simply not designed for it. But I th…
Comment by
WanWizard
April 2014
permalink
REST error handling
I think you're making it overly complex. Create a base REST controller that extends Controller_Rest. Give it an after() method that processes the returned result of your API method. Design a way to allow method to signal an error, and have the…
Comment by
WanWizard
April 2014
permalink
member of method
Yeah, that is how a lot of people use groups. Something I don't agree with. For me, groups are a way to group otherwise unrelated users, so 'users' is fine as a group name. However, 'administrator', 'moderator', e…
Comment by
WanWizard
April 2014
permalink
JOIN on multiple fields
Thought so. I know some effort was put in to handle the aliases at different points, but not everywhere.
Comment by
WanWizard
April 2014
permalink
error cloning fuelphp
Looks like a permissions error. Are you sure your webserver user has access to the files?
Comment by
WanWizard
April 2014
permalink
How can i hash a user password in a registration?
If you're using Auth, then the create_user() method will hash the password for you. If you're using Auth, but don't want to use create_user(), you can use Auth::hash_password('yourpassword') to manually hash the password to …
Comment by
WanWizard
April 2014
permalink
Modules
For modules, the first segment of the URI is the module name. So without the route, www.mywebsite.com/events should already resolve to events/events/index, which is the default module route. The correct syntax would be 'events' => …
Comment by
WanWizard
April 2014
permalink
JOIN on multiple fields
If you want to pass a column name, you need to prevent it from being escaped or quoted as a literal. You need to use DB::expr() for that, like you have found out. Challenge you have is going to be the prefix, as it is generated. You could try \DB:…
Comment by
WanWizard
April 2014
permalink
Getting unexpected Auth results?
Harro's tip to Mike's tip: Read http://docs.fuelphp.com/packages/auth/ormauth/intro.html#/caching, especially the last sentence before the examples. :-)
Comment by
WanWizard
April 2014
permalink
OrmAuth Tables....
Correct. clients. scopes, sessions and session_scopes are tables required by the Opauth package. The 'user_id' fields towards the end are a left-over. Ormauth was designed for our application framework, and we have an ORM base model that…
Comment by
WanWizard
April 2014
permalink
How to make query with join type using or with join statment
You can not, ORM only supports AND at the moment. If you want you can create a feature request for it, at https://github.com/fuel/orm
Comment by
WanWizard
April 2014
permalink
Using Tabbed Interface for User Profile
Agreed. And from a Fuel perspective, the logic in the "create" and "update" views should indeed be in a Viewmodel, which then uses a single form view. For v2, we'll probably go for the same approach as for fieldsets, wher…
Comment by
WanWizard
April 2014
permalink
member of method
Ideally you should not use membership for that (which is why such a method isn't there), but use assigned rghts (through roles) and has_access().
Comment by
WanWizard
April 2014
permalink
Request Soap, parameters lost
Depending on the implementation you need to pass the params as an array, $soap->add_param(array(array( ... perhaps that is the case here too?
Comment by
WanWizard
April 2014
permalink
ORM Soft Delete Purge not working
You probably have to pop into IRC and talk to Steve (uru). He wrote it, but doesn't do forums, so he won't read this... ;-)
Comment by
WanWizard
March 2014
permalink
Problem removing index.php from url
p.s. if you have control over your apache config, I would suggest moving the rewriting stuff to your virtualhost definition, remove the .htaccess, and disable htaccess support for that virtualhost. using htacccess can have quite a performance impac…
Comment by
WanWizard
March 2014
permalink
Problem removing index.php from url
You only need to uncomment those lines if the ajax requests to your site that are not handled by your Fuel app. If that is not the case, this will break all ajax requests, as they are not routed to index.php anymore, so the will not get to your RES…
Comment by
WanWizard
March 2014
permalink
Setting up specific locale LC_NUMERIC
No, there is no specific config for it. It's fine to do this in the app bootstrap, that's what it is there for.
Comment by
WanWizard
March 2014
permalink
How can I switch theme depending subdomains ?
Pas de problème, Brice. ;-) If it is only a switch of active theme, you can do that in the theme.php config file. After all, it's just a php file like any other. It could be something simple like: switch (\Input::server('host')) { …
Comment by
WanWizard
March 2014
permalink
Pass a model result as array from controller to view via Ajax
lol. shit happens... ;-)
Comment by
WanWizard
March 2014
permalink
Pass a model result as array from controller to view via Ajax
That exact code works fine here: // method public function action_json() { $o = Model_table4::find('all'); $a = array(); foreach ($o as $oo) { array_push($a,$oo->to_array()); } var_dump($a); return …
Comment by
WanWizard
March 2014
permalink
Pass a model result as array from controller to view via Ajax
I don't know. It works fine here: public action_test() { $a = json_decode('[{"id":"1","name":"Jhon","surname":"Larry","age":"25"},{"id":&quo…
Comment by
WanWizard
March 2014
permalink
Pass a model result as array from controller to view via Ajax
This is all very weird, since a { } means it's an object, not an array. It translates to: array (size=2) 0 => object(stdClass)[29] public 'id' => string '1' (length=1) public 'name' => …
Comment by
WanWizard
March 2014
permalink
Using Validation Class without using Fieldset Class
For v1, when you create a fieldset object, it has built-in validation, so you can just add rules to fieldset fields: An example: // construct the form $form = \Fieldset::forge('form'); $form->form()->add_csrf…
Comment by
WanWizard
March 2014
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,368
Last Active
9:34AM
Roles
Administrator