|
|
@@ -3,13 +3,16 @@ |
|
|
|
namespace backend\controllers; |
|
|
|
|
|
|
|
use yii ; |
|
|
|
use common\models\Etablissement ; |
|
|
|
|
|
|
|
class BackendController extends \yii\web\Controller |
|
|
|
{ |
|
|
|
|
|
|
|
public function beforeAction($event) |
|
|
|
{ |
|
|
|
if(Yii::$app->user->identity->etatPaiementEtablissement() == 'essai-terminee') |
|
|
|
if(!Yii::$app->user->isGuest && |
|
|
|
(Yii::$app->user->identity->etatPaiementEtablissement() == Etablissement::PAIEMENT_ESSAI_TERMINE || |
|
|
|
Yii::$app->user->identity->etatPaiementEtablissement() == Etablissement::PAIEMENT_RETARD)) |
|
|
|
{ |
|
|
|
$this->redirect(['paiement/index']) ; |
|
|
|
} |