WpUser.fromWPUserRegisterResponse constructor

WpUser.fromWPUserRegisterResponse(
  1. WPUserRegisterResponse wpUserRegisterResponse
)

Creates a WpUser from a WPUserRegisterResponse

Implementation

WpUser.fromWPUserRegisterResponse(
    WPUserRegisterResponse wpUserRegisterResponse) {
  id = wpUserRegisterResponse.data?.userId;
  token = wpUserRegisterResponse.data?.userToken;
  email = wpUserRegisterResponse.data?.email;
  username = wpUserRegisterResponse.data?.username;
  firstName = wpUserRegisterResponse.data?.firstName;
  lastName = wpUserRegisterResponse.data?.lastName;
  avatar = wpUserRegisterResponse.data?.avatar;
  createdAt = wpUserRegisterResponse.data?.createdAt;
}