title
CakePHP 3.1 Login & Registration From Scratch - Part 1
description
In this series I will show you how to create a login and registration system using CakePHP 3.1. We will cover many of the fundamentals of CakePHP
Full Code - https://github.com/bradtraversy/mylogin
MY CAKEPHP COURSE: https://www.eduonix.com/affiliates/id/16-10285
detail
{'title': 'CakePHP 3.1 Login & Registration From Scratch - Part 1', 'heatmap': [{'end': 605.204, 'start': 572.028, 'weight': 1}, {'end': 1114.77, 'start': 1095.729, 'weight': 0.801}], 'summary': 'Learn to set up cakephp in xampp, configure databases, use code generator for user and post setup, implement user authentication and password security, create a login form, and enable logout function for a complete web application development process.', 'chapters': [{'end': 304.057, 'segs': [{'end': 49.366, 'src': 'embed', 'start': 27.589, 'weight': 0, 'content': [{'end': 37.358, 'text': "And if you're on a local machine and you don't have a server up and running, you can use something like XAMPP or XAMPP as it's also pronounced.", 'start': 27.589, 'duration': 9.769}, {'end': 46.184, 'text': "That's what I'll be using, and it gives you an Apache server, MariaDB, which is just a drop-in from MySQL, and PHP.", 'start': 38.158, 'duration': 8.026}, {'end': 49.366, 'text': 'So it gives you everything you need to run CakePHP.', 'start': 46.924, 'duration': 2.442}], 'summary': 'Xampp provides apache server, mariadb, and php for running cakephp.', 'duration': 21.777, 'max_score': 27.589, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/747K6W40ur0/pics/747K6W40ur027589.jpg'}, {'end': 154.34, 'src': 'embed', 'start': 76.955, 'weight': 1, 'content': [{'end': 85.697, 'text': 'okay, now, composer is a dependency manager for php and we can use it to install and set up cake php.', 'start': 76.955, 'duration': 8.742}, {'end': 86.097, 'text': 'all right.', 'start': 85.697, 'duration': 0.4}, {'end': 89.098, 'text': "so that's the first thing we're going to do is install composer.", 'start': 86.097, 'duration': 3.001}, {'end': 91.258, 'text': 'so if we go to getting started, uh.', 'start': 89.098, 'duration': 2.16}, {'end': 96.58, 'text': "there's a whole bunch of information documentation There's a few ways to install it.", 'start': 91.258, 'duration': 5.322}, {'end': 98.321, 'text': "You can use curl if you'd like.", 'start': 96.62, 'duration': 1.701}, {'end': 104.144, 'text': "We don't have curl, so we're going to be using just PHP, which is this command right here.", 'start': 98.841, 'duration': 5.303}, {'end': 109.366, 'text': 'So we want to grab that and go into our command line or shell.', 'start': 104.944, 'duration': 4.422}, {'end': 115.129, 'text': 'XAMPP has a really handy button right here just to take you right to your command line.', 'start': 110.367, 'duration': 4.762}, {'end': 119.726, 'text': 'Now htdocs is going to be the server root.', 'start': 116.303, 'duration': 3.423}, {'end': 133.698, 'text': "so let's go into htdocs and we're going to want to install Composer here so that we can just generate applications right in the server folder.", 'start': 119.726, 'duration': 13.972}, {'end': 140.864, 'text': "All right, now to install, we're going to paste that command and run it.", 'start': 134.238, 'duration': 6.626}, {'end': 146.137, 'text': 'all right.', 'start': 145.137, 'duration': 1}, {'end': 154.34, 'text': "now it created a file called composer dot far, phar, and that's what we're going to want to use to run it all right, you can see.", 'start': 146.137, 'duration': 8.203}], 'summary': 'Composer is used to install and set up cakephp, with installation demonstrated using php command, creating composer.phar file.', 'duration': 77.385, 'max_score': 76.955, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/747K6W40ur0/pics/747K6W40ur076955.jpg'}, {'end': 251.401, 'src': 'embed', 'start': 182.964, 'weight': 7, 'content': [{'end': 196.208, 'text': 'create project, create dash project, and then you want to add this flag prefer dash dist, and then we want to say kphp slash app,', 'start': 182.964, 'duration': 13.244}, {'end': 198.108, 'text': 'and then whatever you want to name your app,', 'start': 196.208, 'duration': 1.9}, {'end': 210.855, 'text': "let's just call it my login and that's going to go ahead and generate the application and create a my login folder right in your htdocs.", 'start': 198.108, 'duration': 12.747}, {'end': 220.063, 'text': "alright. so I have quite a bit of different folders here, but you can see my login and we'll just wait till that's done.", 'start': 210.855, 'duration': 9.208}, {'end': 229.17, 'text': "alright. so it's going to ask about setting folder permissions.", 'start': 220.063, 'duration': 9.107}, {'end': 233.307, 'text': "I'm just going to say yes, And now it should create that folder.", 'start': 229.17, 'duration': 4.137}, {'end': 236.669, 'text': "So let's go cd mylogin.", 'start': 233.347, 'duration': 3.322}, {'end': 244.195, 'text': "And let's see if we can go to localhost slash mylogin.", 'start': 236.689, 'duration': 7.506}, {'end': 248.999, 'text': 'And there we go.', 'start': 248.439, 'duration': 0.56}, {'end': 251.401, 'text': 'So this is the CakePHP landing page.', 'start': 249.12, 'duration': 2.281}], 'summary': "Creating a cakephp project named 'my login' with folder generated in htdocs, accessing it via localhost/mylogin.", 'duration': 68.437, 'max_score': 182.964, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/747K6W40ur0/pics/747K6W40ur0182964.jpg'}, {'end': 304.057, 'src': 'embed', 'start': 275.18, 'weight': 6, 'content': [{'end': 283.463, 'text': 'Go into XAMPP or XAMPP, and then PHP, and then php.ini.', 'start': 275.18, 'duration': 8.283}, {'end': 287.505, 'text': "And you're going to want to just search for intl.", 'start': 285.704, 'duration': 1.801}, {'end': 293.475, 'text': "Alright, in this extension right here, you want to make sure that's enabled.", 'start': 290.134, 'duration': 3.341}, {'end': 297.275, 'text': 'And to do that, you want to just remove the semicolon in front of it.', 'start': 294.115, 'duration': 3.16}, {'end': 301.536, 'text': 'Alright, because if you have this disabled, you may have some problems.', 'start': 297.775, 'duration': 3.761}, {'end': 304.057, 'text': 'Alright, so do that and then just save it.', 'start': 302.156, 'duration': 1.901}], 'summary': "Enable intl extension in xampp's php.ini to avoid problems.", 'duration': 28.877, 'max_score': 275.18, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/747K6W40ur0/pics/747K6W40ur0275180.jpg'}], 'start': 0.959, 'title': 'Setting up cakephp with xampp', 'summary': 'Covers setting up a development environment for cakephp by installing xampp, including apache server, mariadb, and php, setting up composer as a dependency manager, installing composer in xampp using php, creating a cakephp project using dash, and enabling the intl extension in xampp.', 'chapters': [{'end': 98.321, 'start': 0.959, 'title': 'Cakephp login registration system', 'summary': 'Covers setting up a development environment for cakephp by installing xampp, including apache server, mariadb, and php, and setting up composer as a dependency manager for php.', 'duration': 97.362, 'highlights': ['Installing XAMPP provides an Apache server, MariaDB, and PHP, necessary to run CakePHP. XAMPP installation includes Apache server, MariaDB, and PHP.', 'The next step after XAMPP installation is to install composer, a PHP dependency manager. Composer is required for managing dependencies in PHP.', 'The chapter also mentions the availability of documentation for installing and using composer. Documentation is available for installing and using composer.']}, {'end': 182.964, 'start': 98.841, 'title': 'Installing composer in xampp using php', 'summary': 'Explains the process of installing composer in xampp using php, including accessing the command line in xampp, navigating to the server root, and running the composer installation command to generate applications.', 'duration': 84.123, 'highlights': ['The XAMPP command line feature provides a convenient way to access the command line or shell, simplifying the process of navigating to the server root.', 'The process involves installing Composer in XAMPP using PHP, allowing for the generation of applications directly in the server folder.', 'The installation command creates a file called composer.phar, which is used to run Composer for generating applications.', 'The detailed step-by-step process includes running the Composer installation command in the server root and using the php composer.phar command to execute Composer.', 'The demonstration includes adjusting the display properties to ensure better visibility during the installation process.']}, {'end': 304.057, 'start': 182.964, 'title': 'Setting up cakephp project with dash and xampp', 'summary': 'Outlines the process of creating a cakephp project using dash, setting up folder permissions, and enabling the intl extension in xampp to avoid potential errors, with a focus on accessing the application via localhost.', 'duration': 121.093, 'highlights': ["Enabling intl extension in XAMPP The chapter emphasizes the importance of enabling the intl extension in XAMPP by editing the php.ini file and removing the semicolon in front of the 'intl' extension, to avoid potential errors while working with CakePHP.", 'Creating CakePHP project with dash and accessing via localhost The chapter provides a step-by-step guide on creating a CakePHP project using dash, setting folder permissions, and accessing the application via localhost, demonstrating the process of generating the application and navigating to the landing page.', 'Setting folder permissions and navigating to the generated application The chapter highlights the importance of setting folder permissions during the process of creating a CakePHP project, followed by navigating to the generated application through the localhost, ensuring a smooth setup process.']}], 'duration': 303.098, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/747K6W40ur0/pics/747K6W40ur0959.jpg', 'highlights': ['XAMPP installation includes Apache server, MariaDB, and PHP.', 'Composer is required for managing dependencies in PHP.', 'Documentation is available for installing and using composer.', 'The XAMPP command line feature simplifies navigating to the server root.', 'Installing Composer in XAMPP using PHP allows for generating applications directly in the server folder.', 'The installation command creates a file called composer.phar for running Composer.', 'Enabling intl extension in XAMPP is important for working with CakePHP.', 'The chapter provides a step-by-step guide on creating a CakePHP project using dash.', 'Setting folder permissions is important during the process of creating a CakePHP project.', 'Accessing the application via localhost demonstrates the process of generating the application and navigating to the landing page.']}, {'end': 546.204, 'segs': [{'end': 335.298, 'src': 'embed', 'start': 304.597, 'weight': 0, 'content': [{'end': 306.037, 'text': 'Alright, and then go ahead and try again.', 'start': 304.597, 'duration': 1.44}, {'end': 310.218, 'text': "Alright, so let's go ahead and set up a database.", 'start': 306.057, 'duration': 4.161}, {'end': 315.659, 'text': "So to do that, we're going to go to localhost slash phpmyadmin.", 'start': 310.358, 'duration': 5.301}, {'end': 321.975, 'text': "And we'll go to databases and create a new database.", 'start': 318.534, 'duration': 3.441}, {'end': 324.376, 'text': "We'll just call this my login.", 'start': 322.735, 'duration': 1.641}, {'end': 329.117, 'text': "Alright, and we're going to want to create a users table.", 'start': 324.396, 'duration': 4.721}, {'end': 335.298, 'text': "And let's say six fields.", 'start': 332.278, 'duration': 3.02}], 'summary': "Setting up a database with a new 'my login' database and a 'users' table with six fields.", 'duration': 30.701, 'max_score': 304.597, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/747K6W40ur0/pics/747K6W40ur0304597.jpg'}, {'end': 416.966, 'src': 'embed', 'start': 368.365, 'weight': 2, 'content': [{'end': 373.369, 'text': "Okay, we'll also need a password.", 'start': 368.365, 'duration': 5.004}, {'end': 379.193, 'text': "And we'll do 255.", 'start': 376.932, 'duration': 2.261}, {'end': 391.696, 'text': "And we'll need, let's see, let's do created, which will be a date time field, which is right here.", 'start': 379.193, 'duration': 12.503}, {'end': 399.698, 'text': 'And also modified, which will also be a date time field.', 'start': 392.816, 'duration': 6.882}, {'end': 402.658, 'text': 'Okay, so that looks good to me.', 'start': 400.738, 'duration': 1.92}, {'end': 405.059, 'text': "Let's go ahead and save that.", 'start': 403.379, 'duration': 1.68}, {'end': 414.885, 'text': "And I'm also going to create another table called Posts.", 'start': 408.342, 'duration': 6.543}, {'end': 416.966, 'text': "Now I'm not going to make a full blog here.", 'start': 414.925, 'duration': 2.041}], 'summary': 'Created a table with 255 records, date time fields for created and modified, and saved changes. also initiated creation of another table called posts.', 'duration': 48.601, 'max_score': 368.365, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/747K6W40ur0/pics/747K6W40ur0368365.jpg'}, {'end': 546.204, 'src': 'embed', 'start': 490.814, 'weight': 1, 'content': [{'end': 494.515, 'text': "So in Sublime Text, I'm just going to link the project folder.", 'start': 490.814, 'duration': 3.701}, {'end': 509.058, 'text': 'which is in c drive xampp, htdocs and my login all right.', 'start': 496.866, 'duration': 12.192}, {'end': 517.486, 'text': 'now, the file that you want to configure your database in is in config and then app.php.', 'start': 509.058, 'duration': 8.428}, {'end': 520.549, 'text': "all right, we're going to want to go down to where it says data set.", 'start': 517.486, 'duration': 3.063}, {'end': 534.401, 'text': "I'm sorry, data sources, and we're going to change the username to the database username and your database password and the database name.", 'start': 521.798, 'duration': 12.603}, {'end': 544.203, 'text': "Alright so save that and now if you go back to the landing page and reload you can see that we're connected to the database.", 'start': 534.421, 'duration': 9.782}, {'end': 546.204, 'text': 'Get that out of there.', 'start': 545.464, 'duration': 0.74}], 'summary': 'Configure database in sublime text, link project folder, update app.php, and verify connection.', 'duration': 55.39, 'max_score': 490.814, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/747K6W40ur0/pics/747K6W40ur0490814.jpg'}], 'start': 304.597, 'title': 'Setting up and configuring databases', 'summary': "Covers the process of setting up a database with two tables, 'users' and 'posts', and connecting it to the command line. it also demonstrates configuring a database in sublime text, resulting in a successful connection on the landing page reload.", 'chapters': [{'end': 490.133, 'start': 304.597, 'title': 'Setting up database and tables', 'summary': "Discusses the process of setting up a database with two tables, 'users' and 'posts', with specified fields and data types, and also mentions connecting the database to the command line.", 'duration': 185.536, 'highlights': ["The process of setting up a database with two tables, 'users' and 'posts', is explained. Setting up a database with specified tables.", "The fields for the 'users' table are specified as ID, name, email, password, created, and modified, with their respective data types and lengths. Specifying fields for the 'users' table.", "The 'posts' table is also created with fields such as ID, post title, body, user ID, created, and modified, along with their respective data types and lengths. Creating the 'posts' table with specified fields.", 'The process of connecting the database to the command line is mentioned as the next step. Connecting the database to the command line.']}, {'end': 546.204, 'start': 490.814, 'title': 'Configure database in sublime text', 'summary': 'Demonstrates how to configure a database in sublime text by linking the project folder, navigating to the app.php file, and updating the database username, password, and name, resulting in a successful database connection on the landing page reload.', 'duration': 55.39, 'highlights': ['Updating the database username, password, and name in the app.php file enables a successful database connection on the landing page reload.', 'Linking the project folder in Sublime Text is the initial step in configuring the database.', 'Navigating to the app.php file in the specified project folder is essential for updating the database configuration.']}], 'duration': 241.607, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/747K6W40ur0/pics/747K6W40ur0304597.jpg', 'highlights': ["The process of setting up a database with two tables, 'users' and 'posts', is explained. Setting up a database with specified tables.", 'Updating the database username, password, and name in the app.php file enables a successful database connection on the landing page reload.', "The fields for the 'users' table are specified as ID, name, email, password, created, and modified, with their respective data types and lengths. Specifying fields for the 'users' table.", "The 'posts' table is also created with fields such as ID, post title, body, user ID, created, and modified, along with their respective data types and lengths. Creating the 'posts' table with specified fields.", 'Linking the project folder in Sublime Text is the initial step in configuring the database.']}, {'end': 657.269, 'segs': [{'end': 571.608, 'src': 'embed', 'start': 547.446, 'weight': 0, 'content': [{'end': 557.839, 'text': "so now we can go ahead and close that config file and go back to the command line now we're gonna run something called bake which is uh.", 'start': 547.446, 'duration': 10.393}, {'end': 561.684, 'text': "it's basically a code generator or scaffolding tool uh.", 'start': 557.839, 'duration': 3.845}, {'end': 569.307, 'text': "it'll go ahead and set up our users, controller, model, templates, as well as our posts.", 'start': 561.684, 'duration': 7.623}, {'end': 571.608, 'text': "So what we're going to do is say bin.", 'start': 569.887, 'duration': 1.721}], 'summary': 'Using bake to set up users, controller, model, and templates for posts.', 'duration': 24.162, 'max_score': 547.446, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/747K6W40ur0/pics/747K6W40ur0547446.jpg'}, {'end': 657.269, 'src': 'heatmap', 'start': 572.028, 'weight': 1, 'content': [{'end': 575.548, 'text': "Now if you're using Windows like I am, you're going to want to do a backslash.", 'start': 572.028, 'duration': 3.52}, {'end': 581.25, 'text': 'So bin slash cake, then bake all users.', 'start': 576.029, 'duration': 5.221}, {'end': 584.05, 'text': "And that's going to go ahead and run.", 'start': 582.89, 'duration': 1.16}, {'end': 587.291, 'text': "And then we're going to do the same thing, except we're going to say all posts.", 'start': 584.41, 'duration': 2.881}, {'end': 600.18, 'text': "okay, now if we go back and we look in the source src folder, that's where all of our files will be working with our and we look in controller.", 'start': 589.611, 'duration': 10.569}, {'end': 605.204, 'text': 'you can see we have users controller and we have post controller.', 'start': 600.18, 'duration': 5.024}, {'end': 608.086, 'text': 'okay, those were just created in the model.', 'start': 605.204, 'duration': 2.882}, {'end': 618.032, 'text': "we have post table, users table in the view, not the view, the template we're going to have a post folder and users folder.", 'start': 608.086, 'duration': 9.946}, {'end': 624.555, 'text': "okay, so that's all set up for us and it actually should have set our routes up to.", 'start': 618.032, 'duration': 6.523}, {'end': 637.18, 'text': "if we go to config routes and go down, actually it doesn't set them up, but they should work just from using the correct naming conventions.", 'start': 624.555, 'duration': 12.625}, {'end': 645.38, 'text': 'so if we go to slash users, So this is the interface that it gives us, which is kind of nice.', 'start': 637.18, 'duration': 8.2}, {'end': 647.642, 'text': 'And we can create a new user.', 'start': 646.281, 'duration': 1.361}, {'end': 649.223, 'text': 'We can list posts.', 'start': 648.282, 'duration': 0.941}, {'end': 650.624, 'text': 'We can create a new post.', 'start': 649.263, 'duration': 1.361}, {'end': 654.327, 'text': "But we're not going to focus too much on this.", 'start': 652.085, 'duration': 2.242}, {'end': 657.269, 'text': 'This is just the interface.', 'start': 656.108, 'duration': 1.161}], 'summary': 'Setting up routes and controllers for users and posts in windows environment.', 'duration': 57.089, 'max_score': 572.028, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/747K6W40ur0/pics/747K6W40ur0572028.jpg'}], 'start': 547.446, 'title': 'Setting up code generator', 'summary': "Explains using 'bake' code generator to set up users, controller, model, and templates, and demonstrates the generated files and interface for creating and listing users and posts.", 'chapters': [{'end': 657.269, 'start': 547.446, 'title': 'Setting up code generator for model and controller', 'summary': "Explains the process of using 'bake' code generator to set up users, controller, model, and templates, and it also demonstrates the generated files and interface for creating and listing users and posts.", 'duration': 109.823, 'highlights': ["The 'bake' tool sets up users, controller, model, and templates for posts.", 'The generated files include users controller, post controller, post table, and users table.', 'The interface allows creating and listing users and posts.']}], 'duration': 109.823, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/747K6W40ur0/pics/747K6W40ur0547446.jpg', 'highlights': ["The 'bake' tool sets up users, controller, model, and templates for posts.", 'The generated files include users controller, post controller, post table, and users table.', 'The interface allows creating and listing users and posts.']}, {'end': 956.388, 'segs': [{'end': 739.592, 'src': 'embed', 'start': 657.309, 'weight': 0, 'content': [{'end': 662.173, 'text': 'I want to focus on a login, access control, and registration.', 'start': 657.309, 'duration': 4.864}, {'end': 667.016, 'text': "All right, so the first thing we're going to do is from here we're going to add a new user.", 'start': 662.753, 'duration': 4.263}, {'end': 670.559, 'text': 'All right, so name.', 'start': 668.758, 'duration': 1.801}, {'end': 678.681, 'text': 'and email email.', 'start': 675.699, 'duration': 2.982}, {'end': 686.947, 'text': "i'm just going to say test, test.com and password submit.", 'start': 678.681, 'duration': 8.266}, {'end': 688.689, 'text': 'okay, that creates a user.', 'start': 686.947, 'duration': 1.742}, {'end': 696.233, 'text': "Now you'll notice that the password is plain text and that's how it's stored in the database, which is not safe at all.", 'start': 689.986, 'duration': 6.247}, {'end': 701.259, 'text': 'All right, so if we go to the database, we go to Users, you can see the password is just 1234.', 'start': 696.774, 'duration': 4.485}, {'end': 705.023, 'text': 'All right, so we need to hash that password.', 'start': 701.259, 'duration': 3.764}, {'end': 705.804, 'text': 'We need to encrypt it.', 'start': 705.063, 'duration': 0.741}, {'end': 709.003, 'text': 'We can do this in the model.', 'start': 706.701, 'duration': 2.302}, {'end': 714.427, 'text': 'We want to go to the model folder, and then to entity, and then user PHP.', 'start': 709.023, 'duration': 5.404}, {'end': 721.233, 'text': "All right, so this pertains to a single user, while the user's table pertains to the entire table.", 'start': 715.228, 'duration': 6.005}, {'end': 726.917, 'text': "So what we want to do is just add on to this, and we're going to say protected user.", 'start': 721.913, 'duration': 5.004}, {'end': 737.689, 'text': 'function and we want to call this underscore set password and by using this convention, this is actually going to run when the user is created,', 'start': 728.459, 'duration': 9.23}, {'end': 739.592, 'text': 'when the password is created.', 'start': 737.689, 'duration': 1.903}], 'summary': 'Focus on login, access control, and registration. implement password encryption for security.', 'duration': 82.283, 'max_score': 657.309, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/747K6W40ur0/pics/747K6W40ur0657309.jpg'}, {'end': 901.078, 'src': 'embed', 'start': 860.969, 'weight': 2, 'content': [{'end': 876.08, 'text': "so we'll say public function, login and then, before we add anything here, let's save it and we're going to want to create a template.", 'start': 860.969, 'duration': 15.111}, {'end': 882.385, 'text': "so we're going to go in our users folder and say new file, save it as login.ctp.", 'start': 876.08, 'duration': 6.305}, {'end': 886.852, 'text': 'CTP is Cake Template.', 'start': 884.491, 'duration': 2.361}, {'end': 891.914, 'text': "And we're going to create our form.", 'start': 888.633, 'duration': 3.281}, {'end': 897.797, 'text': "Now, by default, we're using foundation as a CSS framework.", 'start': 892.054, 'duration': 5.743}, {'end': 901.078, 'text': 'So I want it to match what we have here.', 'start': 897.877, 'duration': 3.201}], 'summary': 'Creating a login form in cake template for users using foundation css framework.', 'duration': 40.109, 'max_score': 860.969, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/747K6W40ur0/pics/747K6W40ur0860969.jpg'}], 'start': 657.309, 'title': 'User authentication and password security', 'summary': 'Covers adding new users, emphasizing the need for password hashing and encryption for security, and implementing password hashing for user passwords, along with creating a login action and template with css styling.', 'chapters': [{'end': 739.592, 'start': 657.309, 'title': 'User registration and password security', 'summary': 'Discusses adding a new user, highlighting the need to hash and encrypt passwords for security, with an emphasis on the process of setting the password in the user model.', 'duration': 82.283, 'highlights': ['The need to hash and encrypt passwords for security, as plain text passwords are stored in the database, which is not safe at all.', "The process of setting the password in the user model, emphasizing the use of the convention '_set password' to execute when the password is created.", "Adding a new user and demonstrating the creation of a user with a plain text password '1234', highlighting the vulnerability of storing plain text passwords."]}, {'end': 956.388, 'start': 739.592, 'title': 'Implementing password hashing and user login', 'summary': 'Discusses implementing password hashing to secure user passwords and creating a login action in the controller, including creating a login template with css framework styling.', 'duration': 216.796, 'highlights': ["Implementing password hashing to secure user passwords The chapter covers the process of hashing passwords to ensure secure storage, enhancing the application's security.", "Creating a login action in the controller The discussion includes adding a login controller in the user's controller, a crucial step in enabling user authentication and access control.", 'Creating a login template with CSS framework styling The tutorial emphasizes creating a login template styled with a CSS framework, ensuring a visually appealing and user-friendly login interface.']}], 'duration': 299.079, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/747K6W40ur0/pics/747K6W40ur0657309.jpg', 'highlights': ["Implementing password hashing to secure user passwords The chapter covers the process of hashing passwords to ensure secure storage, enhancing the application's security.", "Creating a login action in the controller The discussion includes adding a login controller in the user's controller, a crucial step in enabling user authentication and access control.", 'Creating a login template with CSS framework styling The tutorial emphasizes creating a login template styled with a CSS framework, ensuring a visually appealing and user-friendly login interface.', 'The need to hash and encrypt passwords for security, as plain text passwords are stored in the database, which is not safe at all.', "The process of setting the password in the user model, emphasizing the use of the convention '_set password' to execute when the password is created.", "Adding a new user and demonstrating the creation of a user with a plain text password '1234', highlighting the vulnerability of storing plain text passwords."]}, {'end': 1462.673, 'segs': [{'end': 993.202, 'src': 'embed', 'start': 956.388, 'weight': 0, 'content': [{'end': 962.712, 'text': "and then we're going to have an h2 and we're going to want it to align to the center.", 'start': 956.388, 'duration': 6.324}, {'end': 978.959, 'text': "so we'll say text, center, and for the text we'll just say login.", 'start': 962.712, 'duration': 16.247}, {'end': 983.3, 'text': "and now we're going to do the form and we're going to use the, the form.", 'start': 978.959, 'duration': 4.341}, {'end': 993.202, 'text': "helper that cake offers, alright, so we need our PHP shorthand tag and then we're going to say this form.", 'start': 983.3, 'duration': 9.902}], 'summary': 'Creating an h2 aligned to the center and implementing a form using php shorthand tag and cakephp helper.', 'duration': 36.814, 'max_score': 956.388, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/747K6W40ur0/pics/747K6W40ur0956388.jpg'}, {'end': 1093.848, 'src': 'embed', 'start': 1050.303, 'weight': 4, 'content': [{'end': 1055.447, 'text': 'So for this, we need to specify that we want to use a password field.', 'start': 1050.303, 'duration': 5.144}, {'end': 1058.05, 'text': 'So we can pass in an array of options.', 'start': 1056.088, 'duration': 1.962}, {'end': 1059.991, 'text': 'And one of those options can be type.', 'start': 1058.17, 'duration': 1.821}, {'end': 1066.877, 'text': 'All right, and then finally, we need a button.', 'start': 1064.875, 'duration': 2.002}, {'end': 1075.224, 'text': "So we'll say this form button.", 'start': 1069.719, 'duration': 5.505}, {'end': 1076.145, 'text': "I'm sorry, submit.", 'start': 1075.244, 'duration': 0.901}, {'end': 1080.075, 'text': 'All right.', 'start': 1079.875, 'duration': 0.2}, {'end': 1083.899, 'text': "And in the submit, we're going to put login.", 'start': 1080.376, 'duration': 3.523}, {'end': 1086.741, 'text': 'And then we have an array.', 'start': 1085.36, 'duration': 1.381}, {'end': 1088.042, 'text': 'I just want to add a class.', 'start': 1086.761, 'duration': 1.281}, {'end': 1093.848, 'text': 'OK, class is going to be button.', 'start': 1088.062, 'duration': 5.786}], 'summary': 'Specifying password field, options, and button for form submission with added class', 'duration': 43.545, 'max_score': 1050.303, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/747K6W40ur0/pics/747K6W40ur01050303.jpg'}, {'end': 1130.543, 'src': 'heatmap', 'start': 1095.729, 'weight': 0.801, 'content': [{'end': 1095.989, 'text': 'All right.', 'start': 1095.729, 'duration': 0.26}, {'end': 1102.275, 'text': "So let's save that and see if we can go to users slash login.", 'start': 1096.009, 'duration': 6.266}, {'end': 1104.217, 'text': 'And there we go.', 'start': 1103.656, 'duration': 0.561}, {'end': 1108.959, 'text': "Let's actually move it down a little bit.", 'start': 1106.755, 'duration': 2.204}, {'end': 1114.77, 'text': "So we'll just put a line break here.", 'start': 1110.663, 'duration': 4.107}, {'end': 1125.099, 'text': "Now, KikPHP comes with an authentication component, so that's what we're gonna be using.", 'start': 1119.915, 'duration': 5.184}, {'end': 1130.543, 'text': 'So we need to enable that, and we can do that in controller, app controller.', 'start': 1125.679, 'duration': 4.864}], 'summary': 'Configuring kikphp authentication component in app controller.', 'duration': 34.814, 'max_score': 1095.729, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/747K6W40ur0/pics/747K6W40ur01095729.jpg'}, {'end': 1189.714, 'src': 'embed', 'start': 1130.563, 'weight': 1, 'content': [{'end': 1138.029, 'text': "All right, this app controller is extended by every other controller, so it's always gonna run no matter what page you're on.", 'start': 1130.563, 'duration': 7.466}, {'end': 1143.993, 'text': 'And you can see right in the initialized function, this is where we load components.', 'start': 1139.77, 'duration': 4.223}, {'end': 1148.457, 'text': "So we're gonna add to this, and we're just gonna say this load component.", 'start': 1144.114, 'duration': 4.343}, {'end': 1157.767, 'text': 'and we want to load the auth component all right now.', 'start': 1153.507, 'duration': 4.26}, {'end': 1166.569, 'text': "there's a bunch of options we need to configure here, which is just basically a series of arrays, nested arrays.", 'start': 1157.767, 'duration': 8.802}, {'end': 1180.831, 'text': "so this is going to be authenticate and that's going to be pointed to another array and in there we're going to say form, which will go to an array,", 'start': 1166.569, 'duration': 14.262}, {'end': 1189.714, 'text': "and this will be fields, which will go to another array, and we'll specify our fields here.", 'start': 1180.831, 'duration': 8.883}], 'summary': 'The app controller loads components, like the auth component, with a series of nested arrays for configuration.', 'duration': 59.151, 'max_score': 1130.563, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/747K6W40ur0/pics/747K6W40ur01130563.jpg'}, {'end': 1316.582, 'src': 'embed', 'start': 1279.096, 'weight': 5, 'content': [{'end': 1283.319, 'text': "So we want to go into the user's controller, back to our login function right here.", 'start': 1279.096, 'duration': 4.223}, {'end': 1288.663, 'text': 'And first thing we need to do is test to see if the form was submitted.', 'start': 1285.141, 'duration': 3.522}, {'end': 1302.797, 'text': "So to do that, we can say if And we're going to say this request is and we want to check for a post request, because when the form's submitted,", 'start': 1289.304, 'duration': 13.493}, {'end': 1303.977, 'text': "it's submitted as a post.", 'start': 1302.797, 'duration': 1.18}, {'end': 1316.582, 'text': "All right, if it is a post, then we're going to create a user variable, and we're going to set it to this auth identify.", 'start': 1304.777, 'duration': 11.805}], 'summary': "In the user's controller login function, testing form submission as a post request.", 'duration': 37.486, 'max_score': 1279.096, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/747K6W40ur0/pics/747K6W40ur01279096.jpg'}], 'start': 956.388, 'title': 'Creating a login form and setting up user authentication', 'summary': 'Discusses creating a login form using php and cakephp with a centered heading, form inputs for email and password, and a submit button. it also details setting up user authentication in kikphp, including enabling the auth component, configuring authentication options, creating the login action, and handling validation and redirection.', 'chapters': [{'end': 1093.848, 'start': 956.388, 'title': 'Creating a login form with php', 'summary': 'Discusses creating a login form using php and cakephp, including aligning elements, using form helpers, and specifying input types. it demonstrates how to create an html form with a centered heading, form inputs for email and password, and a submit button with a specified class.', 'duration': 137.46, 'highlights': ['The chapter covers creating an HTML form with a centered heading using h2 and text center properties.', 'It explains the usage of form helpers provided by CakePHP to simplify form creation.', 'The transcript guides on specifying input types for email and password fields using options like type=password.', 'It demonstrates adding a submit button with a specified class using form button and an array of options.']}, {'end': 1462.673, 'start': 1095.729, 'title': 'Setting up user authentication in kikphp', 'summary': 'Details setting up user authentication in kikphp, including enabling the auth component in the app controller, configuring the authentication options, creating the login action, and handling login validation and redirection.', 'duration': 366.944, 'highlights': ["Enabling the auth component in the app controller The app controller is extended by every other controller, and the 'auth' component is loaded in the 'initialized' function, ensuring its execution on every page.", "Configuring authentication options and specifying login action Detailed configuration of authentication options for form submission, including specifying fields for email and password, and setting up the login action to redirect to the 'users' controller and the 'login' action upon authentication.", 'Handling login validation and redirection The process of testing form submission, validating user login, setting user authentication, and redirecting to the specified controller after successful login, with error handling for incorrect login attempts.']}], 'duration': 506.285, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/747K6W40ur0/pics/747K6W40ur0956388.jpg', 'highlights': ['The chapter covers creating an HTML form with a centered heading using h2 and text center properties.', "Enabling the auth component in the app controller The app controller is extended by every other controller, and the 'auth' component is loaded in the 'initialized' function, ensuring its execution on every page.", 'It explains the usage of form helpers provided by CakePHP to simplify form creation.', "Configuring authentication options and specifying login action Detailed configuration of authentication options for form submission, including specifying fields for email and password, and setting up the login action to redirect to the 'users' controller and the 'login' action upon authentication.", 'The transcript guides on specifying input types for email and password fields using options like type=password.', 'Handling login validation and redirection The process of testing form submission, validating user login, setting user authentication, and redirecting to the specified controller after successful login, with error handling for incorrect login attempts.', 'It demonstrates adding a submit button with a specified class using form button and an array of options.']}, {'end': 1629.707, 'segs': [{'end': 1623.454, 'src': 'embed', 'start': 1527.377, 'weight': 0, 'content': [{'end': 1532.699, 'text': 'And then here we want the text to say log out.', 'start': 1527.377, 'duration': 5.322}, {'end': 1550.104, 'text': 'And then we want to set the controller to users and we want to set the action to log out.', 'start': 1533.899, 'duration': 16.205}, {'end': 1551.664, 'text': 'All right.', 'start': 1551.344, 'duration': 0.32}, {'end': 1555.145, 'text': "Now we need to create that log out action in the user's controller.", 'start': 1551.904, 'duration': 3.241}, {'end': 1571.799, 'text': "And all we're going to do here, let's copy this flash message.", 'start': 1568.477, 'duration': 3.322}, {'end': 1575.68, 'text': "And we're just going to change error to success.", 'start': 1573.259, 'duration': 2.421}, {'end': 1582.823, 'text': "And it'll say.", 'start': 1579.222, 'duration': 3.601}, {'end': 1583.824, 'text': 'You are logged out.', 'start': 1582.823, 'duration': 1.001}, {'end': 1586.985, 'text': 'Alright, and then we just want to return the redirect.', 'start': 1584.644, 'duration': 2.341}, {'end': 1592.688, 'text': 'Okay, we want to redirect to.', 'start': 1587.005, 'duration': 5.683}, {'end': 1608.029, 'text': "actually, what we want to do is get rid of that completely and say this off log out, all right, so let's save that.", 'start': 1594.798, 'duration': 13.231}, {'end': 1615.234, 'text': "okay, let's see, click log out and there we go, you are logged out.", 'start': 1608.029, 'duration': 7.205}, {'end': 1623.454, 'text': "so in the next video, in the next part, we're going to implement a registration form so that a user can register.", 'start': 1615.234, 'duration': 8.22}], 'summary': "Setting up log out action in user's controller, changing flash message to success, and implementing registration form next.", 'duration': 96.077, 'max_score': 1527.377, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/747K6W40ur0/pics/747K6W40ur01527377.jpg'}], 'start': 1463.113, 'title': 'Implementing log out function', 'summary': "Demonstrates the process of implementing a log out function, using html link method and creating a log out action in the user's controller, resulting in successful implementation and a preview of the upcoming tasks including registration form implementation.", 'chapters': [{'end': 1629.707, 'start': 1463.113, 'title': 'Implementing log out function', 'summary': "Demonstrates the process of implementing a log out function, using html link method and creating a log out action in the user's controller, resulting in successful implementation and a preview of the upcoming tasks including registration form implementation.", 'duration': 166.594, 'highlights': ['Demonstrating the process of implementing a log out function The chapter focuses on quickly creating a log out function, changing the link to log out, and using the HTML link method to set the controller to users and the action to log out.', "Creating a log out action in the user's controller The process involves creating a log out action in the user's controller, copying the flash message and changing error to success, followed by returning the redirect.", 'Upcoming tasks including registration form implementation The chapter previews the upcoming tasks, which involve implementing a registration form for users to register.']}], 'duration': 166.594, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/747K6W40ur0/pics/747K6W40ur01463113.jpg', 'highlights': ['Demonstrating the process of implementing a log out function, changing the link to log out, and using the HTML link method to set the controller to users and the action to log out.', "Creating a log out action in the user's controller, copying the flash message and changing error to success, followed by returning the redirect.", 'Upcoming tasks including registration form implementation, involving implementing a registration form for users to register.']}], 'highlights': ['Enabling intl extension in XAMPP is important for working with CakePHP.', "The process of setting up a database with two tables, 'users' and 'posts', is explained. Setting up a database with specified tables.", "The 'bake' tool sets up users, controller, model, and templates for posts.", "Implementing password hashing to secure user passwords The chapter covers the process of hashing passwords to ensure secure storage, enhancing the application's security.", "Enabling the auth component in the app controller The app controller is extended by every other controller, and the 'auth' component is loaded in the 'initialized' function, ensuring its execution on every page.", 'Demonstrating the process of implementing a log out function, changing the link to log out, and using the HTML link method to set the controller to users and the action to log out.']}