Myth:Auth |
11-13-2020, 01:06 AM
(This post was last modified: 11-15-2020, 01:54 PM by InsiteFX. Edit Reason: updated with error checking on user id )
I put this together tonight may help you.
PHP Code: // ------------------------------------------------------------------- Returns the complete user object. 10-15-2020 - Update to do better error checking on the user id. What did you Try? What did you Get? What did you Expect?
Joined CodeIgniter Community 2009. ( Skype: insitfx )
You can change the result to an array if you like, I like to work with objects.
What did you Try? What did you Get? What did you Expect?
Joined CodeIgniter Community 2009. ( Skype: insitfx )
Almost there, one thing though...
I'm trying to create a form where administrators can create new users. It has a list of groups that can be assigned to the new user. By reading Myth's code I figured out how to create the user in my own controller and how to assign groups to user id with GroupModel. My problem is, I don't know the user id of the newly created user. Is there some direct way to find out what the user id is? Code: $users = model('UserModel');
You need to return the insert id of the new user, you could also pass it in the session.
PHP Code: $db->insertID() What did you Try? What did you Get? What did you Expect?
Joined CodeIgniter Community 2009. ( Skype: insitfx )
Nice work and nice package!
I have question How to extends user model & user entities ?. I get this error when try to load getDisplayName() function on Entities Quote:ErrorException #1 app/Entities/User.php PHP Code: <?php namespace App\Entities; app/Models/UserModel.php PHP Code: <?php namespace App\Models; Thanks
“ Class 'Myth\Auth\Entities\User' not found”
Sounds like you don’t have the package installed correctly. Are you able to use other portions of it? (12-06-2020, 05:33 AM)MGatner Wrote: “ Class 'Myth\Auth\Entities\User' not found” Nevermind m8, i found this issue. I need to load function authentication on Services and all is working good. good reference for extending entities and so on . i take it from : https://github.com/lonnieezell/myth-forums
In Config/Auth.php theres this:
PHP Code: //-------------------------------------------------------------------- How can I generate the tokenized URL? Didn't find anything in the docs or the source code. |
Welcome Guest, Not a member yet? Register Sign In |