Hi Ben
I’m in the process converting my current project to Ion Auth 2 and I’ve noticed that the ‘get_newest_users()’ function (and others) has been removed.
I had a dig around in the model and found the ‘limit’ and ‘order_by’ functions and had a try at reproducing ‘get_newest_users()’ using:
$this->ion_auth->limit(6);
$this->ion_auth->order_by('created_on', 'desc');
return $this->ion_auth->users()->result();
But it returns all users, not just the latest 6.
Any suggestions how I can code this?
Also can I limit it to users of group ‘members’ only? The users() functions doesn’t appear to reference the users_groups table.
Regards
Russ