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 trialAaditya Raj
Courses Plus Student 3,130 PointsNot able to login...
I am not able to log with the details. I am able to create user successfully as i checked it by recreating, But when tries to login with the login details ,i can't
Please help my snapshot link here:
1 Answer
Jennifer Nordell
Treehouse TeacherHi there, Aaditya Raj ! Looks to me like you're doing great, but you have a couple of very minor errors.
In your doLogin.php
file on line 4, you typed:
$email = findUserByEmail(request()->get('email'));
But the variable was meant to be named $user
:
$user = findUserByEmail(request()->get('email'));
Also, in functions.php
on line 42, you have a minor typo which causes an error:
You wrote:
$response->header->setCookie($cookie);
But the header
should be headers
$response->headers->setCookie($cookie);
That should clear up those two errors and allow you to login. Hope this helps!