mirror of
https://github.com/snipe/snipe-it.git
synced 2024-11-10 07:34:06 -08:00
tinkering to no avail
This commit is contained in:
parent
28bc97f29f
commit
9b448227f7
|
@ -217,11 +217,6 @@ class LdapSync extends Command
|
|||
$user->jobtitle = $item['jobtitle'];
|
||||
$user->country = $item['country'];
|
||||
$user->department_id = $department->id;
|
||||
$user->groups()->sync($ldap_default_group, $user->id);
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
if($item['manager'] != null) {
|
||||
// Get the LDAP Manager
|
||||
|
@ -309,6 +304,11 @@ class LdapSync extends Command
|
|||
if ($user->save()) {
|
||||
$item['note'] = $item['createorupdate'];
|
||||
$item['status'] = 'success';
|
||||
|
||||
if($ldap_default_group != null) {
|
||||
|
||||
$user->groups()->sync($ldap_default_group);
|
||||
}
|
||||
} else {
|
||||
foreach ($user->getErrors()->getMessages() as $key => $err) {
|
||||
$errors .= $err[0];
|
||||
|
|
|
@ -133,6 +133,7 @@ class UsersController extends Controller
|
|||
|
||||
if ($user->save()) {
|
||||
if ($request->filled('groups')) {
|
||||
|
||||
$user->groups()->sync($request->input('groups'));
|
||||
} else {
|
||||
$user->groups()->sync([]);
|
||||
|
|
937
composer.lock
generated
937
composer.lock
generated
File diff suppressed because it is too large
Load diff
|
@ -126,13 +126,13 @@
|
|||
@endforeach
|
||||
</select>
|
||||
|
||||
<span class="help-block">
|
||||
<span class="help-block">
|
||||
{{ trans('admin/settings/general.ldap_default_group_info') }}
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
@endif
|
||||
@else
|
||||
<p>No groups have been created yet. Visit <code>Admin Settings > Permission Groups</code> to add one.</p>
|
||||
@else
|
||||
<p>No groups have been created yet. Visit <code>Admin Settings > Permission Groups</code> to add one.</p>
|
||||
@endif
|
||||
|
||||
</div>
|
||||
|
|
Loading…
Reference in a new issue