Title: Fatal error: function get_ID()
Last modified: July 13, 2018

---

# Fatal error: function get_ID()

 *  Resolved [pekos](https://wordpress.org/support/users/pekos/)
 * (@pekos)
 * [7 years, 11 months ago](https://wordpress.org/support/topic/fatal-error-function-get_id/)
 * Hi Alessandro
 * i have installed the plugin on a fresh web site. When a user is logged and goes
   to the profile settings page i can see the following: (debug is true)
 * Fatal error: Uncaught Error: Call to a member function get_ID() on null in /var/
   www/vhosts/pekos.gr/euro2020.myddns.rocks/wp-content/plugins/wp-user-manager/
   includes/wpum-forms/class-wpum-form-profile.php:153 Stack trace: #0 /var/www/
   vhosts/pekos.gr/euro2020.myddns.rocks/wp-content/plugins/wp-user-manager/includes/
   wpum-forms/class-wpum-form-profile.php(104): WPUM_Form_Profile->get_account_fields()#
   1 /var/www/vhosts/pekos.gr/euro2020.myddns.rocks/wp-content/plugins/wp-user-manager/
   includes/wpum-forms/class-wpum-form-profile.php(258): WPUM_Form_Profile->init_fields()#
   2 /var/www/vhosts/pekos.gr/euro2020.myddns.rocks/wp-content/plugins/wp-user-manager/
   includes/abstracts/abstract-wpum-form.php(121): WPUM_Form_Profile->show_form(
   Array) #3 /var/www/vhosts/pekos.gr/euro2020.myddns.rocks/wp-content/plugins/wp-
   user-manager/includes/wpum-forms/class-wpum-forms.php(95): WPUM_Form->output(
   Array) #4 /var/www/vhosts/pekos.gr/euro2020.myddns.rocks/wp-content/plugins/wp-
   user-manager/includes/actions.php(221): WPUM_Forms->get_form(‘profi in /var/www/
   vhosts/pekos.gr/euro2020.myddns.rocks/wp-content/plugins/wp-user-manager/includes/
   wpum-forms/class-wpum-form-profile.php on line 153
 * Can you please help on that?

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

 *  Thread Starter [pekos](https://wordpress.org/support/users/pekos/)
 * (@pekos)
 * [7 years, 11 months ago](https://wordpress.org/support/topic/fatal-error-function-get_id/#post-10491626)
 * This is from the debug.log
 * #0 /var/www/vhosts/pekos.gr/euro2020.myddns.rocks/wp-content/plugins/wp-user-
   manager/includes/wpum-forms/class-wpum-form-profile.php(104): WPUM_Form_Profile-
   >get_account_fields()
    #1 /var/www/vhosts/pekos.gr/euro2020.myddns.rocks/wp-content/
   plugins/wp-user-manager/includes/wpum-forms/class-wpum-form-profile.php(258):
   WPUM_Form_Profile->init_fields() #2 /var/www/vhosts/pekos.gr/euro2020.myddns.
   rocks/wp-content/plugins/wp-user-manager/includes/abstracts/abstract-wpum-form.
   php(121): WPUM_Form_Profile->show_form(Array) #3 /var/www/vhosts/pekos.gr/euro2020.
   myddns.rocks/wp-content/plugins/wp-user-manager/includes/wpum-forms/class-wpum-
   forms.php(95): WPUM_Form->output(Array) #4 /var/www/vhosts/pekos.gr/euro2020.
   myddns.rocks/wp-content/plugins/wp-user-manager/includes/actions.php(221): WPUM_Forms-
   >get_form(‘profi in /var/www/vhosts/pekos.gr/euro2020.myddns.rocks/wp-content/
   plugins/wp-user-manager/includes/wpum-forms/class-wpum-form-profile.php on line
   153
 * thanx
 *  Plugin Author [WP User Manager](https://wordpress.org/support/users/wpusermanager/)
 * (@wpusermanager)
 * [7 years, 10 months ago](https://wordpress.org/support/topic/fatal-error-function-get_id/#post-10497271)
 * Hey [@pekos](https://wordpress.org/support/users/pekos/),
 * What version of the plugin are you running?
 *  [uomopalese](https://wordpress.org/support/users/uomopalese/)
 * (@uomopalese)
 * [7 years, 10 months ago](https://wordpress.org/support/topic/fatal-error-function-get_id/#post-10507785)
 * Hi,
    same error here.
 * `Fatal error: Uncaught Error: Call to a member function get_ID() on null in /
   Users/gio/Sites/wordpress/wp-content/plugins/wp-user-manager/includes/wpum-forms/
   class-wpum-form-profile.php on line 153`
 * Wordpress 4.9.7
    Wp User Manager 2.0.3
 * Fresh WordPress install
    No other plugins installed
 * `//'group_id' => $primary_group->get_ID(),`
    commenting that line seems to solve
   the problem…
    -  This reply was modified 7 years, 10 months ago by [uomopalese](https://wordpress.org/support/users/uomopalese/).
      Reason: info added
    -  This reply was modified 7 years, 10 months ago by [uomopalese](https://wordpress.org/support/users/uomopalese/).
      Reason: info added
    -  This reply was modified 7 years, 10 months ago by [uomopalese](https://wordpress.org/support/users/uomopalese/).
 *  [uomopalese](https://wordpress.org/support/users/uomopalese/)
 * (@uomopalese)
 * [7 years, 10 months ago](https://wordpress.org/support/topic/fatal-error-function-get_id/#post-10507899)
 * I think i got it…
 * on line 149
    `$primary_group = WPUM()->fields_groups->get_groups( [ 'primary'
   => true ] );`
 * This line check for `'primary'` group.
 * Upon plugin activation, the value `is_primary` on the table `wp_wpum_fieldsgroups`
   for the default form should be set to `'1'` but is set to `'0'`.
 * Switching that value solved the problem for me.
 *  Plugin Contributor [Alessandro Tesoro](https://wordpress.org/support/users/alessandrotesoro/)
 * (@alessandrotesoro)
 * [7 years, 10 months ago](https://wordpress.org/support/topic/fatal-error-function-get_id/#post-10508221)
 * Hi [@uomopalese](https://wordpress.org/support/users/uomopalese/),
 * That’s correct, we’ve found the issue yesterday in collaboration with another
   user. I’m not sure yet how that is caused since I still can replicate it on first
   plugin activation on my end. Anyways I’ll be releasing a fix on monday. Meanwhile
   to fix the issue please download this file [https://www.dropbox.com/s/msz21yxwa1zu2oc/class-wpum-form-profile.php.zip?dl=0](https://www.dropbox.com/s/msz21yxwa1zu2oc/class-wpum-form-profile.php.zip?dl=0)
   unzip it and replace existing one in folder /wp-content/plugins/wp-user-manager/
   includes/wpum-forms/
 *  Plugin Contributor [Alessandro Tesoro](https://wordpress.org/support/users/alessandrotesoro/)
 * (@alessandrotesoro)
 * [7 years, 10 months ago](https://wordpress.org/support/topic/fatal-error-function-get_id/#post-10519601)
 * Issue has also been fixed in v2.0.4

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

The topic ‘Fatal error: function get_ID()’ is closed to new replies.

 * ![](https://ps.w.org/wp-user-manager/assets/icon-256x256.png?rev=3468506)
 * [WP User Manager - User Profile Builder & Membership](https://wordpress.org/plugins/wp-user-manager/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/wp-user-manager/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/wp-user-manager/)
 * [Active Topics](https://wordpress.org/support/plugin/wp-user-manager/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/wp-user-manager/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/wp-user-manager/reviews/)

## Tags

 * [fatal error](https://wordpress.org/support/topic-tag/fatal-error/)

 * 6 replies
 * 4 participants
 * Last reply from: [Alessandro Tesoro](https://wordpress.org/support/users/alessandrotesoro/)
 * Last activity: [7 years, 10 months ago](https://wordpress.org/support/topic/fatal-error-function-get_id/#post-10519601)
 * Status: resolved