Krayin Forum

    Krayin

    • Register
    • Login
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    1. Home
    2. chriscom78
    C
    • Profile
    • Following 0
    • Followers 0
    • Topics 0
    • Posts 2
    • Best 0
    • Controversial 0
    • Groups 0

    chriscom78

    @chriscom78

    0
    Reputation
    1
    Profile views
    2
    Posts
    0
    Followers
    0
    Following
    Joined Last Online
    Location Essex

    chriscom78 Unfollow Follow

    Latest posts made by chriscom78

    • RE: Getting error when. assign sales owner try to open that particular lead

      I have done the following to get it working - not sure if this will break something else but seems to be working so far 🙂

      in the LeadController.php
      n the get function
      replace:

      if ($userIds = bouncer()->getAuthorizedUserIds()) {
          $query->whereIn('leads.user_id', $userIds);
      }
      

      with:

      $userIds = bouncer()->getAuthorizedUserIds() ?? [];
      if (!empty($userIds)) {
          $query->whereIn('leads.user_id', $userIds);
      }
      

      and in the view function, replace:
      replace

      if (
          $userIds = bouncer()->getAuthorizedUserIds()
          && ! in_array($lead->user_id, $userIds)
      ) {
          return redirect()->route('admin.leads.index');
      }
      

      with

      $userIds = bouncer()->getAuthorizedUserIds() ?? [];
      if (!empty($userIds) && !in_array($lead->user_id, $userIds)) {
          return redirect()->route('admin.leads.index');
      
      posted in General Discussion
      C
      chriscom78
    • RE: Getting error when. assign sales owner try to open that particular lead

      I have the same error, too. I'm not sure if it's part of the same problem, but when I try to add a new lead with the non-admin account, I am not able to select the sales owner, so after the lead is created, the person who created it can not see it.

      In both cases, I guess it's a permitions problem and they need access to something I missed on that user group.

      posted in General Discussion
      C
      chriscom78