sapphire
[ class tree: sapphire ] [ index: sapphire ] [ all elements ]

Class: MemberPassword

Source Location: /sapphire/security/MemberPassword.php

Class Overview

Object
   |
   --ViewableData
      |
      --DataObject
         |
         --MemberPassword

Keep track of users' previous passwords, so that we can check that new passwords aren't changed back to old ones.


Variables

Methods


Inherited Variables

Inherited Methods

Class: DataObject

DataObject::__construct()
Construct a new DataObject.
DataObject::buildDataObjectSet()
Take a database Query and instanciate an object for each record.
DataObject::buildSQL()
Build a SQLQuery object to perform the given query.
DataObject::can()
Returns true if the member is allowed to do the given action.
DataObject::castedUpdate()
Pass changes as a map, and try to get automatic casting for these fields.
DataObject::context_obj()
Retrieve the current context object.
DataObject::createComponent()
Creates an empty component for the given one-one or one-many relationship
DataObject::customDatabaseFields()
Get the custom database fields for this object, from self::$db and self::$has_one
DataObject::data()
Returns the associated database record - in this case, the object itself.
DataObject::databaseFields()
Return the complete set of database fields, including Created, LastEdited and ClassName.
DataObject::databaseIndexes()
Return the database indexes on this table.
DataObject::db()
Return all of the database fields defined in self::$db and all the parent classes.
DataObject::dbObject()
Return the DBField object that represents the given field.
DataObject::debug()
Debugging used by Debug::show()
DataObject::defineMethods()
Adds methods from the extensions.
DataObject::delete()
Delete this data object.
DataObject::delete_by_id()
Delete the record with the given ID.
DataObject::destroy()
Destroy all of this objects dependant objects.
DataObject::duplicate()
Create a duplicate of this node.
DataObject::exists()
Returns true if this object "exists", i.e., has a sensible value.
DataObject::extendedSQL()
Like buildSQL, but applies the extension modifications.
DataObject::fieldExists()
Returns the field type of the given field, if it belongs to this class, and not a parent.
DataObject::filledOut()
Checks if the given fields have been filled out.
DataObject::flushCache()
Flush the cached results for get_one()
DataObject::forceChange()
Forces the record to think that all its data has changed.
DataObject::get()
Return all objects matching the filter sub-classes are automatically selected and included
DataObject::getAllFields()
Return a map of all the fields for this record.
DataObject::getChangedFields()
Return the fields that have changed.
DataObject::getClassAncestry()
Get the class ancestry, including the current class name.
DataObject::getComponent()
Return a component object from a one to one relationship, as a DataObject.
DataObject::getComponentJoinField()
Tries to find the db-key for storing a relation (defaults to "ParentID" if no relation is found).
DataObject::getComponents()
Returns a one-to-many component, as a ComponentSet.
DataObject::getField()
Gets the value of a field.
DataObject::getLastWriteFields()
Gets all fields that written in the last write()-call
DataObject::getManyManyComponents()
Returns a many-to-many component, as a ComponentSet.
DataObject::get_by_id()
Return the given element, searching by ID
DataObject::get_by_url()
Return the SiteTree object with the given URL segment.
DataObject::get_one()
Return the first item matching the given query.
DataObject::hasDatabaseField()
Returns true if the given field exists as a database column
DataObject::hasField()
Returns true if the given field exists
DataObject::has_many()
Return the class of a one-to-many component. If $component is null, return all of the one-to-many components and their classes.
DataObject::has_one()
Return the class of a one-to-one component. If $component is null, return all of the one-to-one components and their classes.
DataObject::i18n_plural_name()
Get the translated user friendly plural name of this DataObject
DataObject::i18n_singular_name()
Get the translated user friendly singular name of this DataObject same as singular_name() but runs it through the translating function
DataObject::instance_get()
The internal function that actually performs the querying for get().
DataObject::instance_get_one()
Does the hard work for get_one()
DataObject::isEmpty()
DataObject::isInDB()
DataObject::listOfFields()
Get a bunch of fields in an HTML LI, like this:
DataObject::many_many()
Return information about a many-to-many component.
DataObject::merge()
Merges data and relations from another object of same class, without conflict resolution. Allows to specify which dataset takes priority in case its not empty.
DataObject::newClassInstance()
Create a new instance of a different class from this object's record This is useful when dynamically changing the type of an instance. Specifically, it ensures that the instance of the class is a match for the className of the record.
DataObject::onAfterWrite()
Event handler called after writing to the database.
DataObject::onBeforeDelete()
Event handler called before deleting from the database.
DataObject::onBeforeWrite()
Event handler called before writing to the database.
DataObject::plural_name()
Get the user friendly plural name of this DataObject If the name is not defined (by renaming $plural_name in the subclass), this returns a pluralised version of the class name.
DataObject::populateDefaults()
Load the default values in from the self::$defaults array.
DataObject::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().
DataObject::requireTable()
Check the database schema and update it as necessary.
DataObject::setCastedField()
Set the value of the field, using a casting object.
DataObject::setClassName()
Set the ClassName attribute; $this->class is also updated.
DataObject::setComponent()
Sets the component of a relationship.
DataObject::setField()
Set the value of the field Called by __set() and any setFieldName() methods you might create.
DataObject::set_context_obj()
Sets a 'context object' that can be used to provide hints about how to process a particular get / get_one request.
DataObject::singular_name()
Get the user friendly singular name of this DataObject.
DataObject::toMap()
Convert this object to a map.
DataObject::update()
Pass a number of field changes in a map.
DataObject::validate()
Validate the current object.
DataObject::write()
Writes all changes to this object to the database.
DataObject::writeComponents()
Write the cached components to the database. Cached components could refer to two different instances of the same record.
DataObject::writeWithoutVersion()
Perform a write without affecting the version table.

Class: ViewableData

ViewableData::ATT_val()
Return the value of the given field in an XML attribute safe format.
ViewableData::BaseHref()
Return the site's absolute base URL, with a slash on the end.
ViewableData::buildCastingHelperCache()
A helper function used by castingHelperPair() to build the cache.
ViewableData::cachedCall()
SSViewer's data-access method.
ViewableData::castingHelper()
Returns the "casting helper" for the given field. A casting helper is a piece of PHP code that, when evaluated, will create an object to represent the value.
ViewableData::castingHelperPair()
Returns the "casting helper" for the given field and the casting class name. A casting helper is a piece of PHP code that, when evaluated, will create an object to represent the value.
ViewableData::castingObjectCreator()
Converts a field spec into an object creator.
ViewableData::castingObjectCreatorPair()
Converts a field spec into an object creator pair; this is a map containing className and castingHelper.
ViewableData::CurrentMember()
Returns the currently logged in user.
ViewableData::CurrentPage()
Returns the current controller
ViewableData::customise()
Add some arbitrary data to this viewabledata object. Returns a new object with the merged data.
ViewableData::Debug()
Return a Debugger object.
ViewableData::defineMethods()
Define custom methods for this object. Called once per class.
ViewableData::escapeTypeForField()
Return the string-format type for the given field.
ViewableData::Even()
Returns true if this item is an even item in the container set.
ViewableData::EvenOdd()
Returns 'even' if this item is an even item in the container set.
ViewableData::First()
Returns true if this item is the first in the container set.
ViewableData::FirstLast()
Returns 'first' if this item is the first in the container set.
ViewableData::getField()
Get a field by it's name. This should be overloaded in child classes.
ViewableData::getIterator()
Returns a "1 record iterator" Views <%control %> tags operate by looping over an item for as many instances as are available. When you stick a single ViewableData object in a control tag, the foreach() loop still needs to work. We do this by creating an iterator that only returns one record.
ViewableData::getXMLValues()
Return a named array of calls to XML_val with different parameters.
ViewableData::hasField()
Checks if a field exists on this object. This should be overloaded in child classes.
ViewableData::HasPerm()
Checks if the current user has the given permission.
ViewableData::hasValue()
Returns true if the given method/parameter has a value
ViewableData::iteratorProperties()
Set up the "iterator properties" for this object.
ViewableData::JS_val()
Return the value of the given field in an JavaScript safe format.
ViewableData::Last()
Returns true if this item is the last in the container set.
ViewableData::Me()
When rendering some objects it is necessary to iterate over the object being rendered, to do this, you need access to itself.
ViewableData::Middle()
Returns true if this item is one of the middle items in the container set.
ViewableData::MiddleString()
Returns 'middle' if this item is between first and last.
ViewableData::obj()
Return the object version of the given field/method.
ViewableData::Odd()
Returns true if this item is an even item in the container set.
ViewableData::Pos()
Returns the numerical number of this item in the dataset.
ViewableData::RAW_val()
Return the value of the given field without any escaping.
ViewableData::renderWith()
Render this data using the given template, and return the result as a string You can pass one of the following:
  • A template name.
ViewableData::SecurityID()
Returns the Security ID.
ViewableData::setCustomisedObj()
ViewableData::setField()
Set a fields value. This should be overloaded in child classes.
ViewableData::SQL_val()
Return the value of the given field in an SQL safe format.
ViewableData::ThemeDir()
Returns the root directory of the theme we're working with.
ViewableData::Top()
Returns the top level ViewableData being rendered.
ViewableData::TotalItems()
Return the total number of "sibling" items in the dataset.
ViewableData::val()
Return the value (non-object) version of the given field/method.
ViewableData::XML_val()
Returns the value of the given field / method in an XML-safe format.
ViewableData::__get()
Accessor overloader.
ViewableData::__isset()
Is-set overloader.
ViewableData::__set()
Setter overloader.

Class: Object

Object::__construct()
Object::addMethodsFrom()
Add the all methods from a given parameter to this object.
Object::addStaticVars()
This method lets us extend a built-in class by adding pseudo-static variables to it.
Object::addWrapperMethod()
Add a 'wrapper method'.
Object::add_extension()
Add an extension to the given object.
Object::allMethodNames()
Return the names of all the methods on this object.
Object::buildMethodList()
Object::cacheToFile()
Caches the return value of a method.
Object::cacheToFileWithArgs()
Caches the return value of a method. Passes args to the method as well.
Object::create()
Create allows us to override the standard classes of sapphire with our own custom classes.
Object::createMethod()
Create a new method
Object::defineMethods()
This constructor will be called the first time an object of this class is created.
Object::exists()
Returns true if this object "exists", i.e., has a sensible value.
Object::extend()
Run the given function on all of this object's extensions
Object::extInstance()
Get an extension on this DataObject
Object::getCustomClass()
Object::hasExtension()
Returns true if the given extension class is attached to this object
Object::hasMethod()
Returns true if the given method exists.
Object::is_a()
Object::loadCache()
Loads a current cache from the filesystem, if it can.
Object::parentClass()
Object::sanitiseCachename()
Makes a cache name safe to use in a file system
Object::saveCache()
Saves a cache to the file system
Object::set_stat()
Set a static variable
Object::set_uninherited()
Set an uninherited static variable
Object::stat()
Get a static variable.
Object::strong_create()
Strong_create is a function to enforce a certain class replacement e.g Php5.2's latest introduction of a namespace conflict means we have to replace all instances of Datetime with SSdatetime.
Object::uninherited()
Get an uninherited static variable
Object::useCustomClass()
This function allows you to overload class creation methods, so certain classes are always created correctly over your system.
Object::__call()
Calls a method.
Object::__toString()

Class Details

[line 6]
Keep track of users' previous passwords, so that we can check that new passwords aren't changed back to old ones.



[ Top ]


Class Variables

static $db = array(
      'Password' => 'Varchar',
      'Salt' => 'Varchar',
      'PasswordEncryption' => 'Varchar',
   )

[line 7]


Type:   mixed
Overrides:   Array


[ Top ]

static $has_one = array(
      'Member' => 'Member',
   )

[line 13]


Type:   mixed
Overrides:   Array


[ Top ]



Class Methods


static method log [line 21]

static void log( $member)

Log a password change from the given member.

Call MemberPassword::log($this) from within Member whenever the password is changed.




Parameters:

   $member  

[ Top ]

method checkPassword [line 33]

void checkPassword( $password)

Check if the given password is the same as the one stored in this record



Parameters:

   $password  

[ Top ]


blog comments powered by Disqus
Documentation generated on Tue, 13 May 2008 06:35:29 +1200 by phpDocumentor 1.3.2