mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
Removed notice-level errors
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@40232 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
parent
16c8d9ec11
commit
188526a9de
@ -195,7 +195,9 @@ class Security extends Controller {
|
||||
*/
|
||||
static function findAnAdministrator($username = 'admin', $password = 'password') {
|
||||
$permission = DataObject::get_one("Permission", "`Code` = 'ADMIN'");
|
||||
$adminGroup = DataObject::get_one("Group", "`ID` = '{$permission->GroupID}'", true, "ID");
|
||||
|
||||
$adminGroup = null;
|
||||
if($permission) $adminGroup = DataObject::get_one("Group", "`ID` = '{$permission->GroupID}'", true, "ID");
|
||||
|
||||
if($adminGroup) {
|
||||
if($adminGroup->Members()->First()) {
|
||||
|
Loading…
Reference in New Issue
Block a user