1 00:00:00,730 --> 00:00:01,390 Welcome back. 2 00:00:01,840 --> 00:00:07,090 Now, what we need to do is that we need to work on the account page, because if you go to the account 3 00:00:07,090 --> 00:00:12,160 page without logging in, if I go to the account, I will be able to access the account page. 4 00:00:12,580 --> 00:00:15,730 And we also need to display information about the user who logged in. 5 00:00:16,180 --> 00:00:18,070 So there are two things that we need to work on. 6 00:00:18,760 --> 00:00:23,830 The first thing is that I'm going to open the account that B2B and then in the account that B2B. 7 00:00:23,830 --> 00:00:26,710 The first thing is that we need to protect this page. 8 00:00:26,710 --> 00:00:32,500 So to protect this page, we need to add here B2B card and then we need to check the section. 9 00:00:33,190 --> 00:00:38,980 So we need to say start and start and then if. 10 00:00:39,970 --> 00:00:40,330 If. 11 00:00:40,330 --> 00:00:42,030 What if is set? 12 00:00:42,950 --> 00:00:43,580 Session. 13 00:00:45,520 --> 00:00:46,180 Session. 14 00:00:48,310 --> 00:00:49,180 Logged in. 15 00:00:50,890 --> 00:00:51,670 Logged in. 16 00:00:52,720 --> 00:00:56,980 Logged in is false. 17 00:00:57,010 --> 00:01:02,560 If this is false, I'm going to add here exclamation if is set, logged in session and logged in is 18 00:01:02,560 --> 00:01:02,920 false. 19 00:01:04,540 --> 00:01:09,980 Then if if the user is not logged in, then we need to take them to the login page. 20 00:01:10,030 --> 00:01:10,960 I'm going to say header. 21 00:01:13,870 --> 00:01:19,390 And then location, location, location. 22 00:01:20,410 --> 00:01:22,210 Log in Dot Beach. 23 00:01:25,260 --> 00:01:26,580 This is for the account here. 24 00:01:27,090 --> 00:01:30,060 And in the account we need to display the user information. 25 00:01:30,570 --> 00:01:33,810 So to display the user information, we can use this session. 26 00:01:34,320 --> 00:01:39,060 So in order to do this, we can use the session directly here, remember. 27 00:01:39,060 --> 00:01:39,850 And that can't be true. 28 00:01:39,870 --> 00:01:43,110 If you go to the account page, let me show you where it is. 29 00:01:43,650 --> 00:01:44,310 So it's here. 30 00:01:45,060 --> 00:01:46,170 It's going to be here. 31 00:01:47,130 --> 00:01:48,030 In this account. 32 00:01:48,030 --> 00:01:53,520 So in this account we have the name of the email and here we have the name of the email. 33 00:01:53,520 --> 00:01:55,440 So we need to replace these with these sessions. 34 00:01:55,950 --> 00:02:00,600 So instead of saying Name John here, I'm going to say B2B. 35 00:02:01,830 --> 00:02:02,430 And then. 36 00:02:04,940 --> 00:02:05,630 Echo. 37 00:02:07,650 --> 00:02:08,190 Echo. 38 00:02:10,980 --> 00:02:11,670 Session. 39 00:02:13,530 --> 00:02:14,730 And then user. 40 00:02:15,960 --> 00:02:16,980 Underscore. 41 00:02:17,340 --> 00:02:18,210 Name, I think. 42 00:02:18,960 --> 00:02:20,970 Let me check that from the log in. 43 00:02:21,540 --> 00:02:25,740 From the log in, we have set the session username and the registration. 44 00:02:26,340 --> 00:02:29,280 We all have also set the session to username and email. 45 00:02:29,280 --> 00:02:30,630 So we have the username on the email. 46 00:02:31,170 --> 00:02:35,340 So here I'm going to say a username session username and then semicolon. 47 00:02:37,950 --> 00:02:39,690 And similarly with the email. 48 00:02:45,700 --> 00:02:46,870 BHP and then Echo. 49 00:02:48,700 --> 00:02:49,360 And then. 50 00:02:50,620 --> 00:02:51,280 Session. 51 00:02:55,100 --> 00:02:56,420 He may use an email. 52 00:03:03,550 --> 00:03:05,930 And here I'm going to say, except this is very important. 53 00:03:05,950 --> 00:03:07,000 You need to say your exit. 54 00:03:09,680 --> 00:03:17,700 And we also need to check for double double protection here for adding an extra layer of protection. 55 00:03:17,700 --> 00:03:19,400 And you can even say if. 56 00:03:21,980 --> 00:03:24,170 If is said. 57 00:03:27,360 --> 00:03:28,020 Session. 58 00:03:31,250 --> 00:03:31,790 User name. 59 00:03:31,850 --> 00:03:34,070 User name. 60 00:03:36,080 --> 00:03:37,370 Then we can echo this. 61 00:03:39,730 --> 00:03:40,720 We can echo this. 62 00:03:40,720 --> 00:03:40,960 Good. 63 00:03:42,450 --> 00:03:46,080 This is just for protection, extra layer of protection. 64 00:03:46,770 --> 00:03:49,410 And similarly here, I'm going to say is set. 65 00:03:50,830 --> 00:03:51,370 Session. 66 00:03:55,350 --> 00:03:55,980 User. 67 00:03:57,030 --> 00:03:57,600 Email. 68 00:04:01,970 --> 00:04:05,120 And I'm going to also activate the button. 69 00:04:05,120 --> 00:04:08,540 So we have two buttons we have locked out and orders. 70 00:04:09,200 --> 00:04:14,600 So for the orders, in order to activate the orders, the orders will be in the bottom. 71 00:04:14,600 --> 00:04:21,080 So in order to do this, we just need to order here in the orders, we need to give it. 72 00:04:21,080 --> 00:04:23,050 And in this section we need to give it an idea. 73 00:04:23,060 --> 00:04:30,680 I'm going to say it, and that is going to be order or orders, the ideas orders. 74 00:04:31,100 --> 00:04:34,850 And here I'm going to say address, hashtag orders. 75 00:04:36,080 --> 00:04:42,250 And for the log out, we need to we need to log the user out. 76 00:04:42,260 --> 00:04:46,210 So we need to to add here a link for logging out. 77 00:04:46,220 --> 00:04:48,410 But I'm going to work on this shortly. 78 00:04:48,410 --> 00:04:49,850 Let's first there's this. 79 00:04:50,450 --> 00:04:55,910 So I'm going to here refresh the accounts and they will not be able to check the account anymore unless 80 00:04:55,910 --> 00:04:56,360 they log it. 81 00:04:56,360 --> 00:05:02,960 So let me log it, leave me log in with the account that they created and then. 82 00:05:05,150 --> 00:05:06,410 Let me click on log in. 83 00:05:07,010 --> 00:05:09,350 And as you can see, it's going to display my information here. 84 00:05:09,770 --> 00:05:17,450 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 85 00:05:17,450 --> 00:05:21,650 be able to see you will not be able to go to the log in because I'm logged in. 86 00:05:22,100 --> 00:05:27,200 If I try to go to go to the register page or just the registered entry, I will not be able to. 87 00:05:27,890 --> 00:05:34,720 And if I click on your orders, it's going to go to this section for the log out we need to work on. 88 00:05:34,760 --> 00:05:36,590 Can log out in order to log that user.