-
Notifications
You must be signed in to change notification settings - Fork 633
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
16 changed files
with
275 additions
and
81 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,31 @@ | ||
List of available actions | ||
========================= | ||
# List of available actions | ||
|
||
Yii2-user includes a lot of actions, which you can access by creating URLs for them. Here is the table of available | ||
actions which contains route and short description of each action. You can create URLs for them using special Yii | ||
helper `\yii\helpers\Url::to()`. | ||
|
||
|Route |Description | | ||
|-------------------------------|-----------------------------------------------------------------------| | ||
|**/user/registration/register**| Displays registration form | | ||
|**/user/registration/resend** | Displays resend form | | ||
|**/user/registration/confirm** | Confirms a user (requires *id* and *token* query params) | | ||
|**/user/security/login** | Displays login form | | ||
|**/user/security/logout** | Logs the user out (available only via POST method) | | ||
|**/user/recovery/request** | Displays recovery request form | | ||
|**/user/recovery/reset** | Displays password reset form (requires *id* and *token* query params) | | ||
|**/user/settings/profile** | Displays profile settings form | | ||
|**/user/settings/account** | Displays account settings form (email, username, password) | | ||
|**/user/settings/networks** | Displays social network accounts settings page | | ||
|**/user/profile/show** | Displays user's profile (requires *id* query param) | | ||
|**/user/admin/index** | Displays user management interface | | ||
- **/user/registration/register** Displays registration form | ||
- **/user/registration/resend** Displays resend form | ||
- **/user/registration/confirm** Confirms a user (requires *id* and *token* query params) | ||
- **/user/security/login** Displays login form | ||
- **/user/security/logout** Logs the user out (available only via POST method) | ||
- **/user/recovery/request** Displays recovery request form | ||
- **/user/recovery/reset** Displays password reset form (requires *id* and *token* query params) | ||
- **/user/settings/profile** Displays profile settings form | ||
- **/user/settings/account** Displays account settings form (email, username, password) | ||
- **/user/settings/networks** Displays social network accounts settings page | ||
- **/user/profile/show** Displays user's profile (requires *id* query param) | ||
- **/user/admin/index** Displays user management interface | ||
|
||
## Example of menu | ||
|
||
You can add links to registration, login and logout as follows: | ||
|
||
```php | ||
Yii::$app->user->isGuest ? | ||
['label' => 'Sign in', 'url' => ['/user/security/login']] : | ||
['label' => 'Sign out (' . Yii::$app->user->identity->username . ')', | ||
'url' => ['/user/security/logout'], | ||
'linkOptions' => ['data-method' => 'post']], | ||
['label' => 'Register', 'url' => ['/user/registration/register'], 'visible' => Yii::$app->user->isGuest] | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.