瀏覽代碼

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

prodstable
keun 8 年之前
父節點
當前提交
c116843a94
共有 1 個檔案被更改,包括 13 行新增0 行删除
  1. +13
    -0
      backend/controllers/UserController.php

+ 13
- 0
backend/controllers/UserController.php 查看文件

@@ -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…
取消
儲存