public function detailsJSON($lang, $id)
    {
        // check if user has permissions to access this link
        if(\Illuminate\Support\Facades\Auth::user()->userID != $id) {
            if (!User::hasAccess('User', 'read')) {
                return $this->noPermission();
            }
        }

        $user = App\Models\User::with('roles', 'profileImage')->find($id)->appendLanguageKeys();
        $final = [
          'details' => $user,
          'allGroups' => UserGroup::all()
        ];

        // Fire event
        $final['events'] = Event::fire('user:pre_update', [$final]);
        return $final;
    }