Pārlūkot izejas kodu

Script permettant de lier les users importés à la boulangerie "Le Chat des Noisettes"

prodstable
keun pirms 8 gadiem
vecāks
revīzija
c116843a94
1 mainītis faili ar 13 papildinājumiem un 0 dzēšanām
  1. +13
    -0
      backend/controllers/UserController.php

+ 13
- 0
backend/controllers/UserController.php Parādīt failu

@@ -47,6 +47,19 @@ class UserController extends Controller
],
];
}
public function actionInituseretablissement() {
$user = User::find()->all() ;
foreach($users as $u) {
$user_etab = new \common\models\UserEtablissement ;
$user_etab->id_user = $u->id ;
$user_etab->id_etablissement = 1 ;
$user_etab->save() ;
}
}

/**
* Lists all User models.

Notiek ielāde…
Atcelt
Saglabāt