Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trial
Gregg Mojica
11,506 PointsAdding New Users Part 2 Task 2
Question asks: Next, create a new PFUser variable named 'newUser' and initialize it using the 'user' class method from PFUser. Set the 'username' and 'password' properties of this user using the properties you just set.
I've written the following code:
PFUser *newUser = [PFUser user];
newUser.username = username;
newUser.password = password;
What am I doing wrong here - I cannot figure it out!!
2 Answers
Stone Preston
42,016 PointsIt says to set the username and password using the properties you just set . Try using
newUser.username = self.username
And the same with password
Ashley Dunbabin
17,041 PointsI can't remember the exact question, but I think it was something as silly as username with an upper case N , so userName.
Hope that helps!
Gregg Mojica
11,506 PointsThat didn't work. Any other ideas?
agreatdaytocode
24,757 PointsLate to the Party i know....
@implementation SignupViewController
- (IBAction)signup:(id)sender {
self.username = [self.usernameField.text stringByTrimmingCharactersInSet:[NSCharacterSet whitespaceAndNewlineCharacterSet]];
self.password = [self.passwordField.text stringByTrimmingCharactersInSet:[NSCharacterSet whitespaceAndNewlineCharacterSet]];
PFUser *newUser = [PFUser user];
newUser.username = self.username;
newUser.password = self.password;
}