We already have the basic structure of user documents set up in the classes/user.php
file, but let's go through and add a few more fields.
1. We currently aren't setting
_id
in any of our projects, but we'll need to do that for our user documents. Let's open upclasses/base.php
, and add_id
so that we have the option of setting_id
on any document.<?php abstract class Base { protected $_id; protected $type;
2. We need to add all of the user fields that we just discussed into the
classes/user.php
file, and a few others. Add the following code toclasses/user.php
so that it looks as follows:<?php class User extends Base { protected $name; protected $email; protected $full_name; protected $salt; protected $password_sha; protected $roles;