Fatal ErrorYou cannot register a new account, because you are already logged in.
-
After I have another issue, I tried to figure out what is going on.
I deactivate all other plugins, so code interference couldn’t happen.
But the issue that I couldn’t assign a membership to a member still exists.
So I think maybe it is a database error caused by unplausible data.
So I delete all usermeta starting with ms als metakey and also all posts with posttype like ms%.
Then members and membership doesn’t exists anymore as expected.
Now I create a new membership and assign it to a existing user.
Now I got a fatal error:
Fatal error: Uncaught exception ‘Exception’ with message ‘You cannot register a new account, because you are already logged in.’ in …/wp-content/plugins/membership/app/model/class-ms-model-member.php:989 Stack trace: #0 …/wp-content/plugins/membership/app/model/class-ms-model-member.php(939): MS_Model_Member->create_new_user() #1 …/wp-content/plugins/membership/app/controller/class-ms-controller-member.php(368): MS_Model_Member->save() #2 [internal function]: MS_Controller_Member->members_admin_page_process_editor(”) #3 …/wp-includes/plugin.php(525): call_user_func_array(Array, Array) #4 …/wp-admin/admin.php(226): do_action(‘load-membership…’) #5 {main} thrown in …/wp-content/plugins/membership/app/model/class-ms-model-member.php on line 989I check the file and saw that is_user_logged_in was called. This method returns always true, if the current user is logged in. And because I am dooing this in the backend of WordPress, of course I am logged in. But I assign the membership to another user. And I don’t know why the plugin wants to create a new user if I use assign to an existing user.
It seems to me, that the issues occure after the last update.
- The topic ‘Fatal ErrorYou cannot register a new account, because you are already logged in.’ is closed to new replies.