File tree Expand file tree Collapse file tree 1 file changed +10
-2
lines changed
packages/dart/lib/src/objects Expand file tree Collapse file tree 1 file changed +10
-2
lines changed Original file line number Diff line number Diff line change @@ -141,12 +141,20 @@ class ParseUser extends ParseObject implements ParseCloneable {
141
141
///
142
142
/// After creating a new user via [Parse.create] call this method to register
143
143
/// that user on Parse
144
- Future <ParseResponse > signUp () async {
144
+ /// By setting [allowWithoutEmail] to `true` , you can sign up without setting an email
145
+ Future <ParseResponse > signUp ({bool allowWithoutEmail = false }) async {
145
146
forgetLocalSession ();
146
147
147
148
try {
148
149
if (emailAddress == null ) {
149
- return null ;
150
+ if (! allowWithoutEmail) {
151
+ return null ;
152
+ } else {
153
+ assert (() {
154
+ print ('It is recommended to only allow user signUp with a ' );
155
+ return true ;
156
+ }());
157
+ }
150
158
}
151
159
152
160
final Map <String , dynamic > bodyData = _getObjectData ();
You can’t perform that action at this time.
0 commit comments