User

User - class implements UserInterface

Constructors

this
this()
Undocumented in source.

Members

Functions

deleteEntry
string deleteEntry(T t)
Undocumented in source. Be warned that the author may not have intended to support it.

Properties

addresses
PostalAddress[UUID] addresses [@property getter]
Undocumented in source. Be warned that the author may not have intended to support it.
addresses
PostalAddress addresses [@property setter]
Undocumented in source. Be warned that the author may not have intended to support it.
displayName
DisplayName[UUID] displayName [@property getter]
Undocumented in source. Be warned that the author may not have intended to support it.
displayName
DisplayName displayName [@property setter]
Undocumented in source. Be warned that the author may not have intended to support it.
email
EmailAddress[UUID] email [@property getter]
Undocumented in source. Be warned that the author may not have intended to support it.
email
EmailAddress email [@property setter]
Undocumented in source. Be warned that the author may not have intended to support it.
id
UUID id [@property getter]

id() - UUID

id
UUID id [@property setter]

id(UUID input) -UUID

list
User[UUID] list [@property getter]
Undocumented in source. Be warned that the author may not have intended to support it.
list
User list [@property setter]
Undocumented in source. Be warned that the author may not have intended to support it.
phoneNumbers
PhoneNumber[UUID] phoneNumbers [@property getter]
Undocumented in source. Be warned that the author may not have intended to support it.
phoneNumbers
PhoneNumber phoneNumbers [@property setter]
Undocumented in source. Be warned that the author may not have intended to support it.
realName
NaturalPersonName realName [@property getter]
Undocumented in source. Be warned that the author may not have intended to support it.
realName
NaturalPersonName realName [@property setter]
Undocumented in source. Be warned that the author may not have intended to support it.
socialAccounts
SocialAccount[UUID] socialAccounts [@property getter]
Undocumented in source. Be warned that the author may not have intended to support it.
socialAccounts
SocialAccount socialAccounts [@property setter]
Undocumented in source. Be warned that the author may not have intended to support it.
username
string username [@property getter]
Undocumented in source. Be warned that the author may not have intended to support it.
username
string username [@property setter]
Undocumented in source. Be warned that the author may not have intended to support it.

Inherited Members

From UserInterface

id
UUID id [@property getter]
Undocumented in source.
email
EmailAddress[UUID] email [@property getter]
Undocumented in source.
username
string username [@property getter]
Undocumented in source.
displayName
DisplayName[UUID] displayName [@property getter]
Undocumented in source.
realName
NaturalPersonName realName [@property getter]
Undocumented in source.
socialAccounts
SocialAccount[UUID] socialAccounts [@property getter]
Undocumented in source.
phoneNumbers
PhoneNumber[UUID] phoneNumbers [@property getter]
Undocumented in source.
addresses
PostalAddress[UUID] addresses [@property getter]
Undocumented in source.
list
User[UUID] list [@property getter]
Undocumented in source.

Examples

import std.conv : to;

User[UUID] users;
for (ushort i = 1; i <= 10; i++)
{
	auto user = new User();
	auto testID = sha1UUID("test" ~ i.to!string, sha1UUID("namespace"));
	user.id(testID);
	auto testemail = new EmailAddress("test" ~ i.to!string ~ "@email.com");
	user.email(testemail);
	user.username("test" ~ i.to!string);
	users[user.id] = user;
}

assert(is(typeof(users) == User[UUID]));

auto user = users[users.keys()[0]];
assert(is(typeof(user) == User));
assert(is(typeof(user.id) == UUID));
assert(is(typeof(user.email) == EmailAddress[UUID]));
assert(is(typeof(user.username) == string));
assert(user.id() == sha1UUID(user.username, sha1UUID("namespace")));
assert(user.email() == user.email());
assert(user.username() == user.username);
import vibe.core.log: logInfo;
import std.conv: to;
logInfo(user.email().values()[0].get());

Meta