From 9a118c3693a73f86a5949264f3c3f1f0ec9e42e9 Mon Sep 17 00:00:00 2001 From: Andrew O'Neil Date: Mon, 5 Nov 2007 03:04:58 +0000 Subject: [PATCH] Removed Member::add_role() git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@44254 467b73ca-7a2a-4603-9d3b-597d59a354a9 --- security/Member.php | 19 +------------------ security/OpenID/OpenIDAuthenticator.php | 7 +++---- 2 files changed, 4 insertions(+), 22 deletions(-) diff --git a/security/Member.php b/security/Member.php index 6ac5683cd..fd242a5ee 100644 --- a/security/Member.php +++ b/security/Member.php @@ -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(); -?> \ No newline at end of file +?> diff --git a/security/OpenID/OpenIDAuthenticator.php b/security/OpenID/OpenIDAuthenticator.php index 1d1936cb9..0f9dda421 100644 --- a/security/OpenID/OpenIDAuthenticator.php +++ b/security/OpenID/OpenIDAuthenticator.php @@ -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 { } -?> \ No newline at end of file +?>