Preferences "system" from everyone

Collapse
X
 
  • Time
  • Show
Clear All
new posts

  • Firyo
    replied
    Originally posted by lazovic
    Firyo,

    Very strange. On EspoCRM version 7.1.11, the Preferences mapping through /api/v1/App/user request looks like this:

    Click image for larger version  Name:	11.png Views:	0 Size:	63.9 KB ID:	82620Click image for larger version  Name:	12.png Views:	0 Size:	105.9 KB ID:	82619
    I'm also on the version 7.1.11.

    I've added a line of code in the getUserData function of Services/App.php and It's working well (even if It's not the best way of doing it I think)
    Click image for larger version

Name:	image.png
Views:	164
Size:	35.5 KB
ID:	82624
    Attached Files

    Leave a comment:


  • lazovic
    replied
    Firyo,

    Very strange. On EspoCRM version 7.1.11, the Preferences mapping through /api/v1/App/user request looks like this:

    Click image for larger version

Name:	11.png
Views:	299
Size:	63.9 KB
ID:	82620Click image for larger version

Name:	12.png
Views:	297
Size:	105.9 KB
ID:	82619

    Leave a comment:


  • Firyo
    replied
    Originally posted by lazovic
    Hi Firyo,

    Try using a request like this:
    Code:
    https://your-espo-url/api/v1/Preferences/[your_user_id]
    Thanks for your answer,
    This URL returns the user's preferences so It's fine on this one.

    The problem that I have is that by default the "/api/v1/App/user" route gives me the system preferences everytime.
    The current user preferences are like bypassed by the system's.

    I started digging into the PHP code that handles this request and the preferences are coming from the function getValueMap() from the entity Espo\Entities\Preferences.
    Last edited by Firyo; 09-05-2022, 12:46 PM.

    Leave a comment:


  • yuri
    replied
    Have never encountered this problem before.

    Leave a comment:


  • lazovic
    replied
    Hi Firyo,

    Try using a request like this:
    Code:
    https://your-espo-url/api/v1/Preferences/[your_user_id]

    Leave a comment:


  • Firyo
    started a topic Preferences "system" from everyone

    Preferences "system" from everyone

    Hello there,

    I currently am trying to fix a problem about the preferences system of espo, I always get the preferences of the "system", even if my user have registered preferences in my database.
    What I get from this route (api/v1/App/user) is this
    Click image for larger version

Name:	image.png
Views:	368
Size:	55.6 KB
ID:	82476

    and as you can see this isn't my user's preferences but the global preferences.
    So if anyone knows how to fix this I'll be happy to hear how to fix it.​


    King regards,
    Firyo.
Working...