Welcome back.
Now, what we need to do is that we need to work on the account page, because if you go to the account
page without logging in, if I go to the account, I will be able to access the account page.
And we also need to display information about the user who logged in.
So there are two things that we need to work on.
The first thing is that I'm going to open the account that B2B and then in the account that B2B.
The first thing is that we need to protect this page.
So to protect this page, we need to add here B2B card and then we need to check the section.
So we need to say start and start and then if.
If.
What if is set?
Session.
Logged in.
Logged in is false.
If this is false, I'm going to add here exclamation if is set, logged in session and logged in is
false.
Then if if the user is not logged in, then we need to take them to the login page.
I'm going to say header.
And then location, location, location.
Log in Dot Beach.
This is for the account here.
And in the account we need to display the user information.
So to display the user information, we can use this session.
So in order to do this, we can use the session directly here, remember.
And that can't be true.
If you go to the account page, let me show you where it is.
So it's here.
It's going to be here.
In this account.
So in this account we have the name of the email and here we have the name of the email.
So we need to replace these with these sessions.
So instead of saying Name John here, I'm going to say B2B.
And then.
Echo.
Session.
And then user.
Underscore.
Name, I think.
Let me check that from the log in.
From the log in, we have set the session username and the registration.
We all have also set the session to username and email.
So we have the username on the email.
So here I'm going to say a username session username and then semicolon.
And similarly with the email.
BHP and then Echo.
And then.
Session.
He may use an email.
And here I'm going to say, except this is very important.
You need to say your exit.
And we also need to check for double double protection here for adding an extra layer of protection.
And you can even say if.
If is said.
Session.
User name.
Then we can echo this.
We can echo this.
Good.
This is just for protection, extra layer of protection.
And similarly here, I'm going to say is set.
Session.
User.
Email.
And I'm going to also activate the button.
So we have two buttons we have locked out and orders.
So for the orders, in order to activate the orders, the orders will be in the bottom.
So in order to do this, we just need to order here in the orders, we need to give it.
And in this section we need to give it an idea.
I'm going to say it, and that is going to be order or orders, the ideas orders.
And here I'm going to say address, hashtag orders.
And for the log out, we need to we need to log the user out.
So we need to to add here a link for logging out.
But I'm going to work on this shortly.
Let's first there's this.
So I'm going to here refresh the accounts and they will not be able to check the account anymore unless
they log it.
So let me log it, leave me log in with the account that they created and then.
Let me click on log in.
And as you can see, it's going to display my information here.
And if I try to go to the log in page, if I try here to go to the log in, not reach me, I will not
be able to see you will not be able to go to the log in because I'm logged in.
If I try to go to go to the register page or just the registered entry, I will not be able to.
And if I click on your orders, it's going to go to this section for the log out we need to work on.
Can log out in order to log that user.