How to Create and Fix Missing User Profiles in Your Application

Learn how to create and manage user profiles in your application. This tutorial covers adding an edit profile button, setting up routes and controllers, ensuring profile creation during registration, handling existing users without profiles, and verifying

Published
May 23
Duration
7m 37s

Developer, dog lover, and burrito eater. Currently teaching AdonisJS, a fully featured NodeJS framework, and running Adocasts where I post new lessons weekly. Professionally, I work with JavaScript, .Net C#, and SQL Server.

Adocasts

Burlington, KY

00:00 - Overview of User Profiles
Explanation of the user profile page, listing watched movies, and displaying name and biography.

00:13 - Adding Edit Profile Button
Adding a button for users to edit their name and biography.

00:55 - Defining the Edit Profile Route
Defining the GET route for our edit profile page that also required a user to be authenticated.

01:38 - Controller Setup
Setting up the profiles controller with the edit method.

02:06 - Ensuring Profile Creation During Registration
Creating a profile for users during the registration process.

02:50 - Handling Existing Users Without Profiles
Adding a migration to create profiles for existing users. We cover how you can remedy this situation when it also exists in your production database. However, if this is only on your local database, this step is not needed.

05:25 - Applying Our Migration
Running the migration to add missing profiles.

05:35 - Verifying Profiles in the Database
Verifying the creation of profiles in pgAdmin.

06:30 - Rendering the Edit Profile Page
Rendering the edit profile view with the user's profile information.

06:55 - Conclusion and Migration Explanation
Explanation of why the migration was needed and when it wouldn't be necessary.

Join The Discussion! (0 Comments)

Please sign in or sign up for free to join in on the dicussion.

robot comment bubble

Be the first to Comment!