Title: get_users causes memory error
Last modified: February 17, 2020

---

# get_users causes memory error

 *  Resolved [samnockels](https://wordpress.org/support/users/samnockels/)
 * (@samnockels)
 * [6 years, 3 months ago](https://wordpress.org/support/topic/get_users-causes-memory-error/)
 * Hello,
 * Upon installing your plugin, I experienced an error when using the authorize 
   endpoint. I believe the problem was a timeout/memory allocation error through
   the use of the `get_users` function call at `_mo_check_user_login` (endpoints/
   registry.php line 224)
 * After replacing this line with:
 * `get_user_by('login', $current_user_cookie['username'])`
 * the plugin begins to work as normal. My guess is that our large database of users
   is causing a memory error!
    -  This topic was modified 6 years, 3 months ago by [samnockels](https://wordpress.org/support/users/samnockels/).
    -  This topic was modified 6 years, 3 months ago by [samnockels](https://wordpress.org/support/users/samnockels/).
    -  This topic was modified 6 years, 3 months ago by [samnockels](https://wordpress.org/support/users/samnockels/).

Viewing 3 replies - 1 through 3 (of 3 total)

 *  Plugin Author [miniOrange](https://wordpress.org/support/users/cyberlord92/)
 * (@cyberlord92)
 * [6 years, 3 months ago](https://wordpress.org/support/topic/get_users-causes-memory-error/#post-12447762)
 * Hi Sam,
 * We are looking into the issue.
 * Can you tell us how many users you have right now in your WordPress database 
   so that we can reproduce the issue?
 *  Thread Starter [samnockels](https://wordpress.org/support/users/samnockels/)
 * (@samnockels)
 * [6 years, 3 months ago](https://wordpress.org/support/topic/get_users-causes-memory-error/#post-12449420)
 * We have 16,464 users in total
 *  Plugin Author [miniOrange](https://wordpress.org/support/users/cyberlord92/)
 * (@cyberlord92)
 * [6 years, 3 months ago](https://wordpress.org/support/topic/get_users-causes-memory-error/#post-12457166)
 * Hi Sam,
 * Thanks for the reply.
 * We have fixed the issue and updated the plugin. You can now update/download the
   latest version of the plugin.

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘get_users causes memory error’ is closed to new replies.

 * ![](https://ps.w.org/miniorange-oauth-20-server/assets/icon-128x128.png?rev=1679776)
 * [WP OAuth Server ( Login with WordPress )](https://wordpress.org/plugins/miniorange-oauth-20-server/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/miniorange-oauth-20-server/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/miniorange-oauth-20-server/)
 * [Active Topics](https://wordpress.org/support/plugin/miniorange-oauth-20-server/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/miniorange-oauth-20-server/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/miniorange-oauth-20-server/reviews/)

 * 3 replies
 * 2 participants
 * Last reply from: [miniOrange](https://wordpress.org/support/users/cyberlord92/)
 * Last activity: [6 years, 3 months ago](https://wordpress.org/support/topic/get_users-causes-memory-error/#post-12457166)
 * Status: resolved