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.
Auth
accessing profile field in SimpleAUth
satriawae
July 2015
I Use simpleauth but still don't understand how to retrieve nor use profile_fields.
I use oil console
>>Auth::create_user('somebody','somebody','somebody@mail.com',100,array( 'dept'=>'accounting'));
so in the table
Users
the
profile_fields
store data like this
a:1:{s:4:"
dept
";s:10:"
accounting
";}
I don't understand how to get "accounting" and displaying it in view.
thank you for the advise.. :)
Harro
July 2015
echo Auth::get('accounting', 'not set') would do fine?
satriawae
July 2015
so I do this.,
controller action_index(){
$this->template->title = 'Dashboard';
$this->template->content = View::forge('admin/dashboard');
}
in view admin/dashboard echo Auth::get('accounting', 'not set');
the result is echoing "not set"...,
i try to change view to echo Auth::get('dept', 'not sure'); the result is echoing "not sure"...,
:)
I don't understand how to get data "accounting" or dept=>accounting
Harro
July 2015
Is a user logged in? Auth methods operate on the current user only.
satriawae
July 2015
Sorry.., my mistake I miss the Auth::get_profile_fields(); function
:)
it's easier now., thank
@Harro
Add a Comment
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
Categories
All Discussions
5,089
General
↳ General
3,364
↳ Job Board
13
↳ Installation & Setup
214
Packages
↳ Oil
213
↳ Orm
700
↳ Auth
261
Development
↳ Tips and Tutorials
126
↳ Code share
145
↳ Applications
52
In this Discussion
Harro
July 2015
satriawae
July 2015