Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Authentication Basics lesson: Fix undefined user error #28840

Merged
merged 4 commits into from
Sep 23, 2024

Conversation

Figby222
Copy link
Contributor

@Figby222 Figby222 commented Sep 23, 2024

Because

In the login form EJS template, if the user is not defined whilst rendering the template the application will throw a reference error. This is because, in the if statement checking whether user is defined, user is being referenced simply as user, and not from locals.user. This PR solves that by simply referencing user from locals.user

This PR

  • authentication_basics.md Line 254: Reference user from locals.user

Issue

Closes #XXXXX

Additional Information

Pull Request Requirements

  • I have thoroughly read and understand The Odin Project curriculum contributing guide
  • The title of this PR follows the location of change: brief description of change format, e.g. Intro to HTML and CSS lesson: Fix link text
  • The Because section summarizes the reason for this PR
  • The This PR section has a bullet point list describing the changes in this PR
  • If this PR addresses an open issue, it is linked in the Issue section
  • If any lesson files are included in this PR, they have been previewed with the Markdown preview tool to ensure it is formatted correctly
  • If any lesson files are included in this PR, they follow the Layout Style Guide

This is a simple issue that has not yet been opened.

It was not implied as imperative to the Image Slider exercise to watch the video on transitions,
but it is necessary to Image Slider step 3 as an introduction to CSS transitions.

Changes:
Line 9: Clarify that the video demonstrates CSS transitions.
Line 42: Reference the transitions video for added clarity.
Reference user from locals property in order to
avoid a reference error if user has not been set
to the locals object

Changes:
Line 254: reference user as locals.user
@github-actions github-actions bot added the Content: NodeJS Involves the NodeJS course label Sep 23, 2024
@Figby222 Figby222 changed the title Authentication Basics lesson: Fix undefined user error Authentication Basics Lesson: Fix undefined user error Sep 23, 2024
@Figby222 Figby222 changed the title Authentication Basics Lesson: Fix undefined user error Authentication Basics lesson: Fix undefined user error Sep 23, 2024
@MaoShizhong MaoShizhong merged commit 5dacf0f into TheOdinProject:main Sep 23, 2024
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Content: NodeJS Involves the NodeJS course
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants