BUGFIX Only setting LockedOutUntil to NULL in Member->logIn() if the column is actually present in the database. Otherwise this setting will case an UPDATE Member SQL query to fail on the first /dev/build call on a 2.2->2.3 upgrade if not in dev-mode (=requiring login) (see #3171)

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.3@67529 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
Ingo Schommer 2008-12-05 04:51:30 +00:00 committed by Sam Minnee
parent 0cacc25a12
commit c9b9275fdf

View File

@ -197,7 +197,10 @@ class Member extends DataObject {
Session::set('Member.FailedLogins', $failedLogins);
}
$this->LockedOutUntil = null;
// Don't set column if its not built yet (the login might be precursor to a /dev/build...)
if(array_key_exists('LockedOutUntil', DB::fieldList('Member'))) {
$this->LockedOutUntil = null;
}
$this->write();