Announcement

Collapse
No announcement yet.

Why User Entity and ApiUser Entity uses same controller function ?

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

  • Why User Entity and ApiUser Entity uses same controller function ?

    I created a custom controller for user entity inside "custom\Espo\Custom\Controllers" and i used a 2 function


    public function actionCreate($params, $data, $request) {

    $this->passwordValidation($data->password);


    return parent::actionCreate($params, $data, $request);
    }

    public function passwordValidation($password) {

    // Password validation check

    }

    This is the above function i used inside the user controller , but when i try to create a new ApiUser then it checks for the validation i did for password in apiuser create , not sure how to fix this .

    Is it possible to check for entity name inside the passwordValidtion function

    I tried this code to check the entity name inside the passwordvalidation function

    echo 'Entityname='.$this->getEntityManager();

    but it shows only a null value there. let me know how to solve this one , Thanks in advance
Working...
X