geniv/nette-identity
Composer 安装命令:
composer require geniv/nette-identity
包简介
Identity class for Nette Framework
关键字:
README 文档
README
Installation
$ composer require geniv/nette-identity
or
"geniv/nette-identity": "^1.1"
require:
"php": ">=7.0", "nette/security": ">=2.4", "nette/utils": ">=2.4", "dibi/dibi": ">=3.0", "geniv/nette-general-form": ">=1.0"
Include in application
neon configure:
services: - Identity\IdentityModel(%tablePrefix%)
events:
## for registration events: - Identity\Events\CleanUserEvent(-14 days) # clean non active user # - CallbackEvent # check duplicity # - SetValueEvent([active: false, role: guest]) # default value for registration - Identity\Events\RegistrationEvent # core registration - Identity\Events\ApproveLinkEvent(+1 hour, //Registration:approve) # generate approve link # admin: Identity\Events\RegistrationEmailNotifyEvent # email for admin # user: Identity\Events\RegistrationEmailNotifyEvent # email for user ## for forgotten eventsStep1: - Identity\Events\ForgottenStep1Event(+1 hour, //Forgotten:reset) # generate forgotten link # - Identity\Events\ForgottenEmailNotifyEvent # email for user eventsStep2: - Identity\Events\ForgottenStep2Event
model:
// usage IIdentityModel getColumns(): array addColumn(string $name) setColumns(array $columns) getList(): Fluent getById(int $id) getByEmail(string $email) insert(array $values): int update(int $id, array $values): bool delete(int $id): bool getHash(string $password): string verifyHash(string $password, string $hash): bool existLogin(string $login): int existEmail(string $email): int cleanUser(string $validate = null): int getEncodeHash(int $id, string $login, string $linkValidate = null): string getDecodeHash(string $hash): array processApprove(string $hash): bool isValidForgotten(string $hash): bool processForgotten(string $hash, string $password): bool
统计信息
- 总下载量: 744
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 1
- 依赖项目数: 1
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2018-04-17