# UserRepository

Implements \NPS\Repository\IObjectRepository

User repository class

author | Lukas Korinek
package | Default

### Methods

## __construct

    __construct(\Doctrine\ORM\EntityManagerInterface $em, \NPS\Factory\UserFactory $factory)

### Arguments

#### $em

`\Doctrine\ORM\EntityManagerInterface`

#### $factory

`\NPS\Factory\UserFactory`

## Gets all users within the app

    getAll(integer $limit, integer $offset) : array

### Arguments

#### $limit

`integer`

#### $offset

`integer`

### Response

`array`

## Gets a user by email

    getByEmail(string $email) : \NPS\Repository\User|null

### Arguments

#### $email

`string`

### Response

`\NPS\Repository\User|null`

## Gets an object by its id

    getById(integer $id) : mixed

inheritDoc |

### Arguments

#### $id

`integer`

### Response

`mixed`

### Properties

## entityRepository

    entityRepository : \Doctrine\ORM\EntityRepository

var |

### Type(s)

`\Doctrine\ORM\EntityRepository`

## factory

    factory : \NPS\Factory\UserFactory

var |

### Type(s)

`\NPS\Factory\UserFactory`