Removed Member::add_role()

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@44254 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
Andrew O'Neil 2007-11-05 03:04:58 +00:00
parent 08c91feabc
commit 9a118c3693
2 changed files with 4 additions and 22 deletions

View File

@ -731,23 +731,6 @@ class Member extends DataObject {
return $fields;
}
/**
* Add an extension to the Member class
*
* This method can be used to add behaviour to Member class. The extension
* affects the entire class - all members will get the additional
* behaviour. However, if you want to restrict things, you should add
* appropriate Permission::checkMember() calls to the extensions's
* methods.
*
* @param string $extensionName Class name of the extension to add
*/
public static function add_role($extensionName) {
DataObject::add_extension('Member', $extensionName);
}
/**
* Unsubscribe from newsletter
*
@ -1285,4 +1268,4 @@ class Member_Validator extends RequiredFields {
// algorithms to the PasswordEncryption Enum field
Member::init_db_fields();
?>
?>

View File

@ -55,9 +55,8 @@ class OpenIDAuthenticator extends Authenticator {
* @return bool Returns TRUE on success, FALSE otherwise.
*/
protected static function on_register() {
Member::add_role('OpenIDAuthenticatedRole');
Object::add_extension('Member_Validator',
'OpenIDAuthenticatedRole_Validator');
Object::add_extension('Member', 'OpenIDAuthenticatedRole');
Object::add_extension('Member_Validator', 'OpenIDAuthenticatedRole_Validator');
return parent::on_register();
}
@ -381,4 +380,4 @@ class SessionWrapper extends Auth_Yadis_PHPSession {
}
?>
?>