mirror of
https://github.com/alchemy-fr/Phraseanet.git
synced 2025-10-14 05:23:21 +00:00
Remove register_enable function from login class
This commit is contained in:
@@ -220,9 +220,8 @@ class eventsmanager_notify_autoregister extends eventsmanager_notifyAbstract
|
||||
public function is_available()
|
||||
{
|
||||
$bool = false;
|
||||
$login = new \login();
|
||||
|
||||
if ( ! $this->app['authentication']->isAuthenticated() || ! $login->register_enabled($this->app)) {
|
||||
if ( ! $this->app['authentication']->isAuthenticated() || ! $this->app['registration.enabled']) {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
@@ -199,9 +199,8 @@ class eventsmanager_notify_register extends eventsmanager_notifyAbstract
|
||||
public function is_available()
|
||||
{
|
||||
$bool = false;
|
||||
$login = new \login();
|
||||
|
||||
if ( !$this->app['authentication']->isAuthenticated() || ! $login->register_enabled($this->app)) {
|
||||
if ( !$this->app['authentication']->isAuthenticated() || ! $this->app['registration.enabled']) {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
@@ -9,21 +9,4 @@ class login
|
||||
{
|
||||
return databox_cgu::getHome($app);
|
||||
}
|
||||
|
||||
public function register_enabled(Application $app)
|
||||
{
|
||||
require_once __DIR__ . '/deprecated/inscript.api.php';
|
||||
|
||||
$bases = giveMeBases($app);
|
||||
|
||||
if ($bases) {
|
||||
foreach ($bases as $base) {
|
||||
if ($base['inscript']) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user