Class Member
The member class which represents the users of the system
- Object
-
ViewableData
implements
IteratorAggregate
-
DataObject
implements
DataObjectInterface,
i18nEntityProvider
-
Member
Methods summary
public
|
|
public
|
#
requireDefaultRecords( )
Add default records to database. This function is called whenever the database is built, after the database tables have all been created. Overload this to add default records when the database is built, but make sure you call parent::requireDefaultRecords(). |
public static
|
#
set_login_marker_cookie( mixed $cookieName )
If this is called, then a session cookie will be set to "1" whenever a user logs in. This lets 3rd party tools, such as apache's mod_rewrite, detect whether a user is logged in or not and alter behaviour accordingly. |
public
|
#
checkPassword( string $password )
Check if the passed password matches the stored one (if the member is not locked out). |
public
|
#
canLogIn( )
Returns a valid |
public
|
|
public static
|
#
session_regenerate_id( )
Regenerate the session_id. This wrapper is here to make it easier to disable calls to session_regenerate_id(), should you need to. They have caused problems in certain quirky problems (such as using the Windmill 0.3.6 proxy). |
public static
string
|
#
get_unique_identifier_field( )
Get the field used for uniquely identifying a member in the database. |
public static
|
#
set_unique_identifier_field( mixed $field )
Set the field used for uniquely identifying a member in the database. |
public static
|
#
set_password_validator( mixed $pv )
Set a |
public static
|
|
public static
|
#
set_password_expiry( mixed $days )
Set the number of days that a password should be valid for. Set to null (the default) to have passwords never expire. |
public static
|
#
lock_out_after_incorrect_logins( mixed $numLogins )
Configure the security system to lock users out after this many incorrect logins |
public
|
|
public
|
|
public static
boolean
|
#
logged_in_session_exists( )
Check if the member ID logged in session actually has a database record of the same ID. If there is no logged in user, FALSE is returned anyway. |
public static
|
|
public
|
|
public
|
|
public static
|
#
member_from_autologinhash( boolean $RAW_hash, mixed $login = false )
Return the member for the auto login hash |
public
|
|
public
|
#
getMemberFormFields( boolean $newUser = false )
Returns the fields for the member form - used in the registration/profile module. It should return fields that are editable by the admin and the logged-in user. |
public
|
|
public static
boolean|
|
|
public static
integer
|
|
public static
|
|
public
|
|
public
|
#
onAfterWrite( )
Event handler called after writing to the database. You can overload this to act upon changes made to the data after it is written. $this->changed will have a record database. Don't forget to call parent::onAfterWrite(), though! |
public
boolean
|
#
inGroups( array|
Check if the member is in one of the given groups. |
public
boolean
|
|
public
Returns
|
|
public
String
|
|
public static
|
|
public
string
|
|
public static
String
|
#
get_title_sql( String $tableName = 'Member' )
Return a SQL CONCAT() fragment suitable for a SELECT statement. Useful for custom queries which assume a certain member title format. |
public
string
|
|
public
|
|
public
|
|
public
|
|
public
|
|
public static
|
|
public static
|
#
mapInCMSGroups( array $groups = null )
Get a map of all members in the groups given that have CMS permissions |
public
array
|
#
memberNotInGroups( array $groupList, array $memberGroups = null )
Get the groups in which the member is NOT in |
public
|
|
public
array|string
|
|
public
boolean
|
|
public
boolean
|
|
public
boolean
|
|
public
A
|
|
public
|
#
changePassword( String $password )
Change password. This will cause rehashing according to the
|
public
|
#
registerFailedLogin( )
Tell this member that someone made a failed attempt at logging in as them. This can be used to lock the user out temporarily if too many failed attempts are made. |
public
string
|
#
getHtmlEditorConfigForCMS( )
Get the HtmlEditorConfig for this user to be used in the CMS. This is set by the group. If multiple configurations are set, the one with the highest priority wins. |
Methods inherited from DataObject
Aggregate(),
RelationshipAggregate(),
__construct(),
baseTable(),
belongs_to(),
buildDataObjectSet(),
buildSQL(),
can(),
canCreate(),
castedUpdate(),
composite_fields(),
context_obj(),
customDatabaseFields(),
custom_database_fields(),
data(),
databaseFields(),
databaseIndexes(),
database_extensions(),
database_fields(),
db(),
dbObject(),
debug(),
defaultSearchFilters(),
defineMethods(),
delete(),
delete_by_id(),
destroy(),
disableCMSFieldsExtensions(),
disable_subclass_access(),
duplicate(),
enableCMSFieldsExtensions(),
enable_subclass_access(),
exists(),
extendedSQL(),
fieldLabel(),
flushCache(),
flush_and_destroy_cache(),
forceChange(),
get(),
getAllFields(),
getCMSActions(),
getChangedFields(),
getClassAncestry(),
getComponent(),
getComponents(),
getComponentsQuery(),
getDefaultSearchContext(),
getField(),
getFrontEndFields(),
getManyManyComponents(),
getManyManyComponentsQuery(),
getManyManyFilter(),
getManyManyJoin(),
getRemoteJoinField(),
getReverseAssociation(),
get_by_id(),
get_one(),
get_validation_enabled(),
hasDatabaseField(),
hasField(),
hasOwnTableDatabaseField(),
hasValue(),
has_many(),
has_one(),
has_own_table(),
i18n_plural_name(),
i18n_singular_name(),
inheritedDatabaseFields(),
instance_get(),
instance_get_one(),
isChanged(),
isEmpty(),
isInDB(),
is_composite_field(),
many_many(),
many_many_extraFields(),
merge(),
newClassInstance(),
onAfterDelete(),
onBeforeDelete(),
plural_name(),
provideI18nEntities(),
relObject(),
requireTable(),
reset(),
scaffoldFormFields(),
scaffoldSearchFields(),
searchableFields(),
setCastedField(),
setClassName(),
setComponent(),
setField(),
set_context_obj(),
set_validation_enabled(),
singular_name(),
summaryFields(),
toMap(),
update(),
write(),
writeComponents(),
writeWithoutVersion()
Methods inherited from ViewableData
ATT_val(),
BaseHref(),
CSSClasses(),
ColumnBreak(),
ColumnCalc(),
ColumnNumber(),
ColumnPad(),
ColumnPos(),
CurrentMember(),
CurrentPage(),
Debug(),
Even(),
EvenOdd(),
First(),
FirstLast(),
HasPerm(),
IsAjax(),
JS_val(),
Last(),
Me(),
Middle(),
MiddleString(),
Modulus(),
MultipleOf(),
Odd(),
Pos(),
RAW_val(),
SQL_val(),
ThemeDir(),
ThemeName(),
Top(),
TotalItems(),
XML_val(),
__get(),
__isset(),
__set(),
buildCastingCache(),
cachedCall(),
castingClass(),
castingHelper(),
castingHelperPair(),
castingObjectCreator(),
castingObjectCreatorPair(),
customise(),
escapeTypeForField(),
getIterator(),
getSecurityID(),
getXMLValues(),
i18nLocale(),
iteratorProperties(),
obj(),
renderWith(),
setCustomisedObj()
Methods inherited from Object
__call(),
__toString(),
__wakeup(),
addMethodsFrom(),
addStaticVars(),
addWrapperMethod(),
add_extension(),
add_static_var(),
allMethodNames(),
cacheToFile(),
cacheToFileWithArgs(),
clearCache(),
combined_static(),
create(),
createMethod(),
create_from_string(),
extInstance(),
extend(),
getCustomClass(),
getExtensionInstance(),
getExtensionInstances(),
get_extensions(),
get_static(),
hasExtension(),
hasMethod(),
has_extension(),
invokeWithExtensions(),
is_a(),
loadCache(),
parentClass(),
parse_class_spec(),
remove_extension(),
sanitiseCachename(),
saveCache(),
set_stat(),
set_static(),
set_uninherited(),
stat(),
strong_create(),
uninherited(),
uninherited_static(),
useCustomClass()
Magic methods summary
Properties summary
public static
array
|
$db |
#
Database field definitions. This is a map from field names to field type. The field type should be a class that extends . |
public static
array
|
$belongs_many_many |
#
The inverse side of a many-many relationship. This is a map from component name to data type. |
public static
array
|
$has_one |
#
One-to-zero relationship defintion. This is a map of component name to data
type. In order to turn this into a true one-to-one relationship you can add a
|
public static
array
|
$has_many |
#
This defines a one-to-many relationship. It is a map of component name to the remote data class. |
public static
array
|
$many_many |
#
many-many relationship definitions. This is a map from component name to data type. |
public static
array
|
$many_many_extraFields |
#
Extra fields to include on the connecting many-many table. This is a map from field name to field type. |
public static
string
|
$default_sort |
#
The default sort expression. This will be inserted in the ORDER BY clause of a SQL query if no other sort expression is provided. |
public static
array
|
$indexes |
#
If a field is in this array, then create a database index on that field. This is a map from fieldname to index type. See SS_Database->requireIndex() and custom subclasses for details on the array notation. |
public static
boolean
|
$notify_password_change | |
public static
array
|
$searchable_fields |
#
All searchable database columns in this object, currently queried with a "column LIKE '%keywords%' statement. |
public static
array
|
$summary_fields |
#
Provides a default list of fields to be used by a 'summary' view of this object. |
public static
Array
|
$title_format | |
protected static
string
|
$unique_identifier_field |
#
The unique field used to identify this member. By default, it's "Email", but another common field could be Username. |
protected static
mixed
|
$password_validator |
#
|
protected static
mixed
|
$password_expiry_days |
#
The number of days that a password should be valid for. By default, this is null, which means that passwords never expire |
protected static
mixed
|
$lock_out_after_incorrect_logins | |
protected static
mixed
|
$login_marker_cookie |
#
If this is set, then a session cookie with the given name will be set on log-in, and cleared on logout. |
Properties inherited from DataObject
$allowed_actions,
$ancestry,
$api_access,
$belongs_to,
$brokenOnDelete,
$brokenOnWrite,
$cache_get_one,
$cache_has_own_table,
$cache_has_own_table_field,
$casting,
$componentCache,
$components,
$create_table_options,
$default_records,
$defaults,
$destroyed,
$field_labels,
$original,
$plural_name,
$record,
$singular_name
Properties inherited from ViewableData
$customisedObject,
$default_cast,
$failover,
$iteratorPos,
$iteratorTotalItems