private function SpiController::getSuperName in Acquia Connector 8
Same name and namespace in other branches
- 8.2 src/Controller/SpiController.php \Drupal\acquia_connector\Controller\SpiController::getSuperName()
- 3.x src/Controller/SpiController.php \Drupal\acquia_connector\Controller\SpiController::getSuperName()
Determine if the super user has a weak name.
Return value
int 1 if the super user has a weak name, 0 otherwise.
1 call to SpiController::getSuperName()
- SpiController::get in src/
Controller/ SpiController.php - Gather site profile information about this site.
File
- src/
Controller/ SpiController.php, line 695
Class
- SpiController
- SPI Controller class.
Namespace
Drupal\acquia_connector\ControllerCode
private function getSuperName() {
$result = Database::getConnection()
->query("SELECT name FROM {users_field_data} WHERE uid = 1 AND (name LIKE '%admin%' OR name LIKE '%root%') AND LENGTH(name) < 15")
->fetchAll();
return (int) $result;
}