1 00:00:00,570 --> 00:00:01,230 Welcome back. 2 00:00:01,620 --> 00:00:04,110 Now, what we need to do is that we need to work on the logout. 3 00:00:04,470 --> 00:00:06,510 So if I click on logout, nothing is going to happen. 4 00:00:06,780 --> 00:00:08,160 So we need to activate this manner. 5 00:00:08,460 --> 00:00:13,380 So if we go to the account, that will be you will find that we have a button called logged in and here 6 00:00:13,380 --> 00:00:14,100 we have a trip. 7 00:00:14,100 --> 00:00:22,320 We need to say your account that HP and then we need to add question mark and then logout is equal to 8 00:00:22,320 --> 00:00:22,590 one. 9 00:00:24,030 --> 00:00:28,220 And then I'm going to go to the here in the account at the top. 10 00:00:28,230 --> 00:00:29,130 I'm going to say if. 11 00:00:31,110 --> 00:00:32,420 Is sex. 12 00:00:34,820 --> 00:00:37,070 It is said get. 13 00:00:40,310 --> 00:00:41,120 It is set. 14 00:00:41,120 --> 00:00:42,590 Get log out. 15 00:00:43,910 --> 00:00:44,510 Log. 16 00:00:45,880 --> 00:00:46,390 Out. 17 00:00:48,410 --> 00:00:50,060 And then I'm going to say if. 18 00:00:51,800 --> 00:00:53,720 Is set. 19 00:00:55,730 --> 00:00:56,330 Session. 20 00:00:58,720 --> 00:01:01,450 Session logged in. 21 00:01:03,040 --> 00:01:05,020 Log in. 22 00:01:05,020 --> 00:01:09,670 If a user is locked in, then we need to log them out and to log of the user out. 23 00:01:09,670 --> 00:01:16,480 We need to unset the session when on set session. 24 00:01:19,280 --> 00:01:24,710 User logged in first logged in, but this is not enough. 25 00:01:24,740 --> 00:01:34,430 We need also to unset the user email and and the user and the user username. 26 00:01:35,030 --> 00:01:40,070 In other words, we need to delete the user name and the email because they logged. 27 00:01:40,280 --> 00:01:45,410 So I'm going to see on said session user email. 28 00:01:47,040 --> 00:01:50,190 And also I'm going to say on set. 29 00:01:51,390 --> 00:01:52,050 Session. 30 00:01:54,330 --> 00:01:55,020 Session. 31 00:01:57,320 --> 00:01:58,370 User name. 32 00:02:00,830 --> 00:02:03,200 And lastly, I'm going to say, hey there. 33 00:02:04,400 --> 00:02:06,350 And then location. 34 00:02:07,730 --> 00:02:10,790 And then a log in that BHP. 35 00:02:11,120 --> 00:02:13,760 So this is going to take the user to the log in page one more time. 36 00:02:14,090 --> 00:02:16,700 And finally, we just need to exit leaving. 37 00:02:16,880 --> 00:02:19,130 Now save and let me hand it over to the browser to test. 38 00:02:20,120 --> 00:02:21,560 So now in the browser I'm logged in. 39 00:02:21,560 --> 00:02:24,520 Let me first refresh Illini click on logout. 40 00:02:24,530 --> 00:02:27,960 If you click on log out, I will be taken to the login page. 41 00:02:27,980 --> 00:02:29,210 So it worked successfully. 42 00:02:29,450 --> 00:02:30,020 And you can't. 43 00:02:30,020 --> 00:02:33,350 There's not even one more time if you want. 44 00:02:33,950 --> 00:02:35,540 So let me test one more time. 45 00:02:36,200 --> 00:02:40,400 I'm going to log in one more time and then now I'm logged in. 46 00:02:40,400 --> 00:02:41,810 Let me click on log out. 47 00:02:41,810 --> 00:02:46,400 If I click on Logout, I will be taken to the login page.