uprm-inso4101-2023-2024-s2 / semester-project-rumaradoptionapp

semester-project-rumaradoptionapp created by GitHub Classroom
5 stars 0 forks source link

User Profile Page-Username first letter #203

Closed HectorSepul closed 7 months ago

HectorSepul commented 7 months ago

Objective: Make the default profile picture with the user's first letter of their username. Task Description: There is an empty circle symbol on the home page, we want to make a default profile picture as soon as you sign up for the page and log into it. By automatically create a simple background with the color green and include right in the middle the usernames first letter.

Implementation:

To achieve the goal of creating a default profile picture that includes the user's first letter of their username, modified the files index.js and Home.ejs.

In index.js, ensured that when a user logs in, the session variables are updated to include the first letter of the username in uppercase (request.session.usernameFirstLetter = request.body.username[0].toUpperCase()), along with other necessary user information.

When rendering the home page (/ route), the code will check whether the user is logged in. If so, it will render the home page with the user's profile picture, their first letter of the username, and other session data such as whether the user is a faculty member or involved in foster care.

By integrating these changes in the code, we ensure that users who do not have a profile picture set will be provided with a default one based on their username.

We will edit the index.js, the home.ejs and the users.js

Testing and Debugging: We can test this by creating a new user and seeing if the user's first letter of the username is displayed as the picture Deadline: April 23, 2024

evnd04 commented 7 months ago

I don't understand this issue, describe it in a detailed manner.

rukitoyordan commented 7 months ago

@Saul-Caban-UPRM

Saul-Caban-UPRM commented 7 months ago

@evnd04 I've edited the task description, if you need more information please let me know again.

HectorSepul commented 7 months ago

Task Completed