Welcome Guest, Not a member yet? Register   Sign In
Modify users data as an admin
#3

(This post was last modified: 04-27-2024, 11:10 AM by xsPurX.)

This sql query will give you a list of users, and you can use the user_id to make changes depending on what you want to do, if you need to update data in two tables just run two different update queries. Is that helpful enough or do you need some other examples? I am assuming you're using custom data, I don't know if the fill() option in shield will update custom fileds? Not sure about that.
Code:
        $users = $this->db->table('users, auth_groups_users,auth_identities')
->where('users.id = auth_groups_users.user_id')
->where('users.id = auth_identities.user_id')
->where('auth_identities.type', 'email_password')
->select('
users.id,
users.username,
users.status,
auth_groups_users.group,
auth_identities.secret
            ')
->orderBy('users.username', 'ASC')
->get();
return $users;
Reply


Messages In This Thread
Modify users data as an admin - by padam - 04-26-2024, 01:51 PM
RE: Modify users data as an admin - by luckmoshy - 04-26-2024, 04:56 PM
RE: Modify users data as an admin - by padam - 04-27-2024, 11:42 AM
RE: Modify users data as an admin - by xsPurX - 04-27-2024, 10:54 AM
RE: Modify users data as an admin - by xsPurX - 04-27-2024, 01:37 PM



Theme © iAndrew 2016 - Forum software by © MyBB