We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 4d88cd0 + 99db86f commit 0276e8cCopy full SHA for 0276e8c
LabelStoreMax/lib/resources/pages/account_register.dart
@@ -183,6 +183,11 @@ class _AccountRegistrationPageState extends NyState<AccountRegistrationPage> {
183
username: username,
184
),
185
);
186
+
187
+ if (wpUserRegisterResponse?.data?.userToken != null) {
188
+ await WPJsonAPI.instance.api((request) => request.wpUserAddRole(wpUserRegisterResponse!.data!.userToken, role: "customer"));
189
+ await WPJsonAPI.instance.api((request) => request.wpUserRemoveRole(wpUserRegisterResponse!.data!.userToken, role: "subscriber"));
190
+ }
191
} on UsernameTakenException catch (e) {
192
showToastNotification(context,
193
title: trans("Oops!"),
0 commit comments