mirror of
https://github.com/getgrav/grav-plugin-admin.git
synced 2025-11-01 19:06:16 +01:00
Add edit and create user functionality, add link to current user
This commit is contained in:
@@ -273,6 +273,11 @@ class Admin
|
||||
$obj->merge($post);
|
||||
$obj->file($file);
|
||||
|
||||
$data[$type] = $obj;
|
||||
} elseif (preg_match('|users/|', $type)) {
|
||||
$obj = User::load(preg_replace('|users/|', '', $type));
|
||||
$obj->merge($post);
|
||||
|
||||
$data[$type] = $obj;
|
||||
} else {
|
||||
throw new \RuntimeException("Data type '{$type}' doesn't exist!");
|
||||
|
||||
Reference in New Issue
Block a user