Sfoglia il codice sorgente

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

prodstable
keun 8 anni fa
parent
commit
c116843a94
1 ha cambiato i file con 13 aggiunte e 0 eliminazioni
  1. +13
    -0
      backend/controllers/UserController.php

+ 13
- 0
backend/controllers/UserController.php Vedi File

@@ -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.

Loading…
Annulla
Salva