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
This commit is contained in:
Sam Minnee 2008-08-11 05:18:18 +00:00
parent c812ca5f91
commit eb9e66808c
3 changed files with 4 additions and 4 deletions

View File

@ -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

View File

@ -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 .

View File

@ -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']);