Skip to content

Commit 7c9a50a

Browse files
VigneshPasupathyphillwiggins
authored andcommitted
Allow adding additional columns to ParseUser through the set call (parse-community#232)
1 parent f402a8e commit 7c9a50a

File tree

2 files changed

+8
-4
lines changed

2 files changed

+8
-4
lines changed

README.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -441,6 +441,13 @@ Also, once logged in you can manage sessions tokens. This feature can be called
441441
```dart
442442
user = ParseUser.currentUser();
443443
```
444+
445+
To add additional columns to the user:
446+
```dart
447+
var user = ParseUser("TestFlutter", "TestPassword123", "[email protected]")
448+
..set("userLocation", "FlutterLand");
449+
```
450+
444451
Other user features are:-
445452
* Request Password Reset
446453
* Verification Email Request

lib/src/objects/parse_user.dart

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -136,10 +136,7 @@ class ParseUser extends ParseObject implements ParseCloneable {
136136
return null;
137137
}
138138

139-
final Map<String, dynamic> bodyData = <String, dynamic>{};
140-
bodyData[keyVarEmail] = emailAddress;
141-
bodyData[keyVarPassword] = password;
142-
bodyData[keyVarUsername] = username;
139+
final Map<String, dynamic> bodyData = _getObjectData();
143140
final Uri url = getSanitisedUri(_client, '$path');
144141
final String body = json.encode(bodyData);
145142
_saveChanges();

0 commit comments

Comments
 (0)