Announcement

Collapse
No announcement yet.

Access to entities and user from GET

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Access to entities and user from GET

    Hi, i put querry from main.html to entryPoint, in entryPoint i'm trying getUser() -> get('name'), but have no access. How i can fix it?

  • #2
    Problem is solved. I Add \Espo\Core\EntryPoints\Base to extends, so my code looks:
    <?php
    namespace Espo\EntryPoints;

    use \Espo\Core\Interfaces\Injectable;
    use \Espo\ORM\Entity;


    class EP extends \Espo\Core\EntryPoints\Base
    {
    public function run()
    {
    $user = $this->getUser();
    $userId = $user -> get('name');
    $put_content = file_put_contents ( 'log.txt' , $userId );
    echo $put_content;
    }
    }
    ?>

    Comment

    Working...
    X