Guest User

Untitled

a guest
Jun 4th, 2024
50
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.27 KB | None | 0 0
  1. // Save the user
  2. $allowedPostFields = array_keys($rules);
  3. $user = $this->getUserEntity();
  4. $postData = $this->request->getPost($allowedPostFields);
  5. $postData['role'] = $this->request->getPost('role'); // Tambahkan 'role' ke data yang akan disimpan
  6. $user->fill($postData);
Advertisement
Add Comment
Please, Sign In to add comment