Backend\Core\Engine\User::getUserId PHP Метод

getUserId() публичный Метод

Get userid
public getUserId ( ) : integer
Результат integer
    public function getUserId()
    {
        return $this->userId;
    }

Usage Example

Пример #1
0
 /**
  * Execute the action
  */
 public function execute()
 {
     $email = $this->getParameter('email', 'string');
     // does the user exist
     if ($email !== null) {
         parent::execute();
         // delete item
         if (BackendUsersModel::undoDelete($email)) {
             // get user
             $user = new BackendUser(null, $email);
             // trigger event
             $item = array('id' => $user->getUserId(), 'email' => $email);
             BackendModel::triggerEvent($this->getModule(), 'after_undelete', array('item' => $item));
             // item was deleted, so redirect
             $this->redirect(BackendModel::createURLForAction('edit') . '&id=' . $user->getUserId() . '&report=restored&var=' . $user->getSetting('nickname') . '&highlight=row-' . $user->getUserId());
         } else {
             // invalid user
             $this->redirect(BackendModel::createURLForAction('index') . '&error=non-existing');
         }
     } else {
         $this->redirect(BackendModel::createURLForAction('index') . '&error=non-existing');
     }
 }
All Usage Examples Of Backend\Core\Engine\User::getUserId