Skip to content

Commit 6a0d22d

Browse files
committed
Fix User Signup w/ custom User Subclass
Signup would crash if a subless of ParseUser was being used. Instead of instantiating ParseUser directly, find the correct subclass from the ParseObject subclass registration map.
1 parent 81df4c3 commit 6a0d22d

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

ParseUI-Login/src/main/java/com/parse/ui/ParseSignupFragment.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@
3333
import android.widget.ImageView;
3434

3535
import com.parse.ParseException;
36+
import com.parse.ParseObject;
3637
import com.parse.ParseUser;
3738
import com.parse.SignUpCallback;
3839

@@ -175,7 +176,7 @@ public void onClick(View v) {
175176
} else if (name != null && name.length() == 0) {
176177
showToast(R.string.com_parse_ui_no_name_toast);
177178
} else {
178-
ParseUser user = new ParseUser();
179+
ParseUser user = ParseObject.create(ParseUser.class);
179180

180181
// Set standard fields
181182
user.setUsername(username);

0 commit comments

Comments
 (0)