From eb9e66808c14dbee9d7e86d42797a87f93db9207 Mon Sep 17 00:00:00 2001 From: Sam Minnee Date: Mon, 11 Aug 2008 05:18:18 +0000 Subject: [PATCH] API CHANGE: Renamed static Member::autologinhash() to static Member::member_from_autloginhash() to be more in line with naming convnetions, and not conflict with Member.AutoLoginHash in the database git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@60392 467b73ca-7a2a-4603-9d3b-597d59a354a9 --- security/ChangePasswordForm.php | 4 ++-- security/Member.php | 2 +- security/Security.php | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/security/ChangePasswordForm.php b/security/ChangePasswordForm.php index c32710724..c2b35e436 100755 --- a/security/ChangePasswordForm.php +++ b/security/ChangePasswordForm.php @@ -22,7 +22,7 @@ class ChangePasswordForm extends Form { function __construct($controller, $name, $fields = null, $actions = null) { if(!$fields) { $fields = new FieldSet(); - if(Member::currentUser() && (!isset($_REQUEST['h']) || !Member::autoLoginHash($_REQUEST['h']))) { + if(Member::currentUser() && (!isset($_REQUEST['h']) || !Member::member_from_autologin($_REQUEST['h']))) { $fields->push(new EncryptField("OldPassword",_t('Member.YOUROLDPASSWORD', "Your old password"))); } @@ -60,7 +60,7 @@ class ChangePasswordForm extends Form { if(!$member) { if(Session::get('AutoLoginHash')) { - $member = Member::autoLoginHash(Session::get('AutoLoginHash')); + $member = Member::member_from_autologin(Session::get('AutoLoginHash')); } // The user is not logged in and no valid auto login hash is available diff --git a/security/Member.php b/security/Member.php index 3207434fd..de5d1ae98 100644 --- a/security/Member.php +++ b/security/Member.php @@ -271,7 +271,7 @@ class Member extends DataObject { * * @param bool $login Should the member be logged in? */ - static function autoLoginHash($RAW_hash, $login = false) { + static function member_from_autologinhash($RAW_hash, $login = false) { $SQL_hash = Convert::raw2sql($RAW_hash); $member = DataObject::get_one('Member',"`AutoLoginHash`='" . $SQL_hash . diff --git a/security/Security.php b/security/Security.php index 53f1e9bad..6d060a12f 100644 --- a/security/Security.php +++ b/security/Security.php @@ -453,7 +453,7 @@ class Security extends Controller { $controller = new Page_Controller($tmpPage); $controller->init(); - if(isset($_REQUEST['h']) && Member::autoLoginHash($_REQUEST['h'])) { + if(isset($_REQUEST['h']) && Member::member_from_autologinhash($_REQUEST['h'])) { // The auto login hash is valid, store it for the change password form Session::set('AutoLoginHash', $_REQUEST['h']);