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
ucfirst() class name changes in 1.6
No. 1.6 is most likely the last release in the 1.x train, after it we're going to work full-blown on v2, which is going to use the composer autoloader. Composer follows PSR-0, which means it's case-sentitive, same case. So you can name th…
Comment by
WanWizard
April 2013
permalink
Can I halt execution of a Controller_Template based class?
Why so complex, and not use File::download() ? Are you using output encoding (enabled by default in production)? You need to switch that off if you're downloading files.
Comment by
WanWizard
April 2013
permalink
NinjAuth?
Currently it's kinda broken, yes. I've been busy with the upgrade to 1.6, but no time to finish it. Ninjauth is not in there, it's an external package that is pulled in using a git submodule reference. The problem seems to be that t…
Comment by
WanWizard
April 2013
permalink
error
Thanks for the heads-up.
Comment by
WanWizard
April 2013
permalink
standalone action
You should use a task for that, which you can start using oil.
Comment by
WanWizard
April 2013
permalink
Retrieve single column using DB class?
No, you can't, it's a special method that constructs a count query and returns the result.
Comment by
WanWizard
April 2013
permalink
Auth::check() always return false
Pretty standard. What happens if you run that query, with a hardcoded username for $username? Does it find the record?
Comment by
WanWizard
April 2013
permalink
ucfirst() class name changes in 1.6
There are no new coding standards. The standards for class (segment) naming have always been ucfirst(). Problem is that the autoloader isn't (wasn't) that strict, which allowed you to create class names like PressRelease, which were never…
Comment by
WanWizard
April 2013
permalink
Auth::check() always return false
Auth::check() does indeed delete the session variables if the check fails. It runs: $this->user = \DB::select_array(\Config::get('simpleauth.table_columns', array('*'))) ->where('username', '=', $u…
Comment by
WanWizard
April 2013
permalink
SimpleAuth and md5
No problem, here to help... :-)
Comment by
WanWizard
April 2013
permalink
File::download throws error ErrorException [ Warning ]: finfo::finfo() [finfo.finfo]: Failed to load
Could have been a Config::set('file', $something) as well. If it's not set (by default it's null), then it uses whatever PHP thinks is default. And that is either always there, or never...
Comment by
WanWizard
April 2013
permalink
Auth::check() always return false
Our posts crossed, I see you already dumped the session. You don't do a destroy of the session somewhere?
Comment by
WanWizard
April 2013
permalink
Auth::check() always return false
If before this redirect you can set a session variable, and you can read that variable back in your profile method, then the session is ok, and I can't see why the login won't work. Can you do a Debug::dump(Session::get());exit; In prof…
Comment by
WanWizard
April 2013
permalink
Auth::check() always return false
Getting confused here. First you write that it works when you set the expiration time to 0, now you say you still have the issue? And I haven't seen an anwer to my other questions: - do you redirect immediately after login? - are you using In…
Comment by
WanWizard
April 2013
permalink
File::download throws error ErrorException [ Warning ]: finfo::finfo() [finfo.finfo]: Failed to load
It uses \Config::get('file.magic_file', null) has that been overwritten, removed, set to some other value somewhere (by mistake)?
Comment by
WanWizard
April 2013
permalink
SimpleAuth and md5
The name of the class has been changed in 1.6, Auth_Login_SimpleAuth is invalid according to the coding standards (class name segments should be ucfirst()). Remember this when you upgrade to 1.6.
Comment by
WanWizard
April 2013
permalink
Auth::check() always return false
For the session, it is VITAL that all time and timezone settings are correct. - make sure the server is configured for the correct timezone - make sure the server runs on time (NTP) - make sure php.ini defines the same timezone as the server - if t…
Comment by
WanWizard
April 2013
permalink
I can not retrieve the logged user
What are you using for session store? cookies? Do you redirect directly after login? Which browser? If you do Session::set('test', 'test'); on one page, and Debug::dump(Session::get('test', 'not found'));…
Comment by
WanWizard
April 2013
permalink
error
Fixed. Please update again.
Comment by
WanWizard
April 2013
permalink
SimpleAuth and md5
Read the docs section on extending core classes. The classes in the Auth package are added to the core, so they can be extended in the same way. In short (assuming you want to extend the login driver): - make sure the Auth package is always_load…
Comment by
WanWizard
April 2013
permalink
I can not retrieve the logged user
How do you try to "load" the user?
Comment by
WanWizard
April 2013
permalink
SimpleAuth and md5
To be more exact: extend the Auth class in your application, and overload the hash_password method. It's not advisable to change code in the package, that would hamper future upgrades.
Comment by
WanWizard
April 2013
permalink
Retrieve single column using DB class?
To count records, simply use DB::count_records('table'). execute() always returns a resultset, even if the resultset only contains one row. It's better to be consistent then having to take into account that the returned value might b…
Comment by
WanWizard
April 2013
permalink
Example of search form processing
Someone in IRC mentioned you could have a look at Arr::pluck(), it allows you to extract a subset of fields from a nested structure.
Comment by
WanWizard
April 2013
permalink
Example of search form processing
You can use to_array() on a model object as an alternative.
Comment by
WanWizard
April 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,369
Last Active
2:24PM
Roles
Administrator