Relatude Help

4 The other base types

Type Extends Members Use
ISite ISystemCollection, IPage Cultures, and those of a page a site: a collection of content with its cultures, and the page at the top of its tree
ICMSUser ISystemUser Name, Email, Username, Password, Forename, Surname, Company, JobTitle, Mobile, CultureCode, Meta a person who signs in
ICMSUserGroup ISystemUserGroup GroupName, its members and memberships (from Relatude.DB) a group of users
ICountry TwoLetterCode, ThreeLetterCode a country
IEmailContent FromEmail, FromEmailName, CCEmails, Subject, Body, ReplyToEmail an email's content, embedded in other types

A site is both a collection and a page. Let your home page type extend ISite, as in Everything together, and each home page is a site at the top of its own tree. The CMS interface shows one site's tree at a time (chapter 17).

On ICMSUser, Email, Username and Mobile are unique when not empty, and Username is trimmed and lower-cased when written. CultureCode is the user's preferred culture, such as nb-NO. Name is stored and indexed, so you can query users by name.

Password is Relatude.DB's PasswordValue. The store hashes it (Argon2id) when the user is written, refuses one shorter than 8 characters, and never sends it out of the server. The CMS interface shows whether a password is set and lets an editor set a new one.

user.Password.SetPassword(typed);                 // hashed when the user is written
db.Update(user);
var ok = db.Get<ICMSUser>(id).Password.Verify(typed);

ICountry is in the namespace Relatude.CMS, not Relatude.CMS.Models. A site that uses it registers that namespace too.