First, we are going to give ourselves the ability to log in to our blog and store our user information in our session. We are going to wait to encrypt our passwords and set up permissions for our user until the next chapter. For now, we only want to be able to save a user ID when a user saves a blog post.
We made our changes to the model, but that doesn't mean everything is going to work. Browse to
http://localhost/phalconBlog/posts/create and try to create a new post. You will not be able to. Instead, you will see the following error message in your browser because we just created a rule that our database requires every post to have a user ID:
Another problem is that in order to have a user ID, we need a user in ...