diff --git a/lib/User/AuthClient/Facebook.php b/lib/User/AuthClient/Facebook.php
new file mode 100644
index 0000000..bc08f57
--- /dev/null
+++ b/lib/User/AuthClient/Facebook.php
@@ -0,0 +1,25 @@
+getUserAttributes()['email'])
+ ? $this->getUserAttributes()['email']
+ : null;
+ }
+
+ /**
+ * @inheritdoc
+ */
+ public function getUsername()
+ {
+ return;
+ }
+}
diff --git a/lib/User/AuthClient/GitHub.php b/lib/User/AuthClient/GitHub.php
new file mode 100644
index 0000000..0a5d45d
--- /dev/null
+++ b/lib/User/AuthClient/GitHub.php
@@ -0,0 +1,27 @@
+getUserAttributes()['email'])
+ ? $this->getUserAttributes()['email']
+ : null;
+ }
+
+ /**
+ * @inheritdoc
+ */
+ public function getUsername()
+ {
+ return isset($this->getUserAttributes()['login'])
+ ? $this->getUserAttributes()['login']
+ : null;
+ }
+}
diff --git a/lib/User/AuthClient/Google.php b/lib/User/AuthClient/Google.php
new file mode 100644
index 0000000..3fe4f3d
--- /dev/null
+++ b/lib/User/AuthClient/Google.php
@@ -0,0 +1,25 @@
+getUserAttributes()['emails'][0]['value'])
+ ? $this->getUserAttributes()['emails'][0]['value']
+ : null;
+ }
+
+ /**
+ * @inheritdoc
+ */
+ public function getUsername()
+ {
+ return;
+ }
+}
diff --git a/lib/User/AuthClient/LinkedIn.php b/lib/User/AuthClient/LinkedIn.php
new file mode 100644
index 0000000..919a1c2
--- /dev/null
+++ b/lib/User/AuthClient/LinkedIn.php
@@ -0,0 +1,25 @@
+getUserAttributes()['email-address'])
+ ? $this->getUserAttributes()['email-address']
+ : null;
+ }
+
+ /**
+ * @inheritdoc
+ */
+ public function getUsername()
+ {
+ return;
+ }
+}
diff --git a/lib/User/AuthClient/Twitter.php b/lib/User/AuthClient/Twitter.php
new file mode 100644
index 0000000..0733b3e
--- /dev/null
+++ b/lib/User/AuthClient/Twitter.php
@@ -0,0 +1,26 @@
+getUserAttributes()['screen_name'])
+ ? $this->getUserAttributes()['screen_name']
+ : null;
+ }
+
+ /**
+ * @return null Twitter does not provide user's email address
+ */
+ public function getEmail()
+ {
+ return null;
+ }
+}
diff --git a/lib/User/AuthClient/VKontakte.php b/lib/User/AuthClient/VKontakte.php
new file mode 100644
index 0000000..6101099
--- /dev/null
+++ b/lib/User/AuthClient/VKontakte.php
@@ -0,0 +1,39 @@
+getAccessToken()->getParam('email');
+ }
+
+ /**
+ * @inheritdoc
+ */
+ public function getUsername()
+ {
+ return isset($this->getUserAttributes()['screen_name'])
+ ? $this->getUserAttributes()['screen_name']
+ : null;
+ }
+
+ /**
+ * @inheritdoc
+ */
+ protected function defaultTitle()
+ {
+ return Yii::t('user', 'VKontakte');
+ }
+}
diff --git a/lib/User/AuthClient/Yandex.php b/lib/User/AuthClient/Yandex.php
new file mode 100644
index 0000000..ead2475
--- /dev/null
+++ b/lib/User/AuthClient/Yandex.php
@@ -0,0 +1,42 @@
+getUserAttributes()['emails'])
+ ? $this->getUserAttributes()['emails']
+ : null;
+
+ if ($emails !== null && isset($emails[0])) {
+ return $emails[0];
+ } else {
+ return null;
+ }
+ }
+
+ /**
+ * @inheritdoc
+ */
+ public function getUsername()
+ {
+ return isset($this->getUserAttributes()['login'])
+ ? $this->getUserAttributes()['login']
+ : null;
+ }
+
+ /**
+ * @inheritdoc
+ */
+ protected function defaultTitle()
+ {
+ return Yii::t('user', 'Yandex');
+ }
+}
diff --git a/lib/User/Controller/RecoveryController.php b/lib/User/Controller/RecoveryController.php
index 14555b8..d7436b4 100644
--- a/lib/User/Controller/RecoveryController.php
+++ b/lib/User/Controller/RecoveryController.php
@@ -90,7 +90,7 @@ class RecoveryController extends Controller
$this->trigger(FormEvent::EVENT_AFTER_REQUEST, $event);
return $this->render(
- 'message',
+ '/user/shared/message',
[
'title' => Yii::t('user', 'Recovery message sent'),
'module' => $this->module,
@@ -130,7 +130,7 @@ class RecoveryController extends Controller
);
return $this->render(
- 'message',
+ '/user/shared/message',
[
'title' => Yii::t('user', 'Invalid or expired link'),
'module' => $this->module,
@@ -149,7 +149,7 @@ class RecoveryController extends Controller
$this->trigger(ResetPasswordEvent::EVENT_AFTER_RESET, $event);
return $this->render(
- 'message',
+ '/user/shared/message',
[
'title' => Yii::t('user', 'Password has been changed'),
'module' => $this->module,
diff --git a/lib/User/Controller/RegistrationController.php b/lib/User/Controller/RegistrationController.php
index 045a401..f84b702 100644
--- a/lib/User/Controller/RegistrationController.php
+++ b/lib/User/Controller/RegistrationController.php
@@ -106,7 +106,7 @@ class RegistrationController extends Controller
'Your account has been created and a message with further instructions has been sent to your email'
)
);
- return $this->render('message', [
+ return $this->render('/user/shared/message', [
'title' => Yii::t('user', 'Your account has been created')
]);
}
@@ -186,7 +186,7 @@ class RegistrationController extends Controller
}
return $this->render(
- 'message',
+ '/user/shared/message',
[
'title' => Yii::t('user', 'Account confirmation'),
'module' => $this->module,
diff --git a/lib/User/resources/views/admin/_account.php b/lib/User/resources/views/admin/_account.php
new file mode 100644
index 0000000..af4dcef
--- /dev/null
+++ b/lib/User/resources/views/admin/_account.php
@@ -0,0 +1,45 @@
+
+ *
+ * For the full copyright and license information, please view the LICENSE.md
+ * file that was distributed with this source code.
+ */
+
+use yii\bootstrap\ActiveForm;
+use yii\helpers\Html;
+
+/*
+ * @var yii\web\View $this
+ * @var dektrium\user\models\User $user
+ */
+
+?>
+
+beginContent('@dektrium/user/views/admin/update.php', ['user' => $user]) ?>
+
+ 'horizontal',
+ 'enableAjaxValidation' => true,
+ 'enableClientValidation' => false,
+ 'fieldConfig' => [
+ 'horizontalCssClasses' => [
+ 'wrapper' => 'col-sm-9',
+ ],
+ ],
+]); ?>
+
+= $this->render('_user', ['form' => $form, 'user' => $user]) ?>
+
+
+
+
+
+endContent() ?>
diff --git a/lib/User/resources/views/admin/_assignments.php b/lib/User/resources/views/admin/_assignments.php
new file mode 100644
index 0000000..50f93ba
--- /dev/null
+++ b/lib/User/resources/views/admin/_assignments.php
@@ -0,0 +1,32 @@
+
+ *
+ * For the full copyright and license information, please view the LICENSE.md
+ * file that was distributed with this source code.
+ */
+
+use dektrium\rbac\widgets\Assignments;
+
+/**
+ * @var yii\web\View $this
+ * @var dektrium\user\models\User $user
+ */
+
+?>
+
+beginContent('@dektrium/user/views/admin/update.php', ['user' => $user]) ?>
+
+= yii\bootstrap\Alert::widget([
+ 'options' => [
+ 'class' => 'alert-info alert-dismissible',
+ ],
+ 'body' => Yii::t('user', 'You can assign multiple roles or permissions to user by using the form below'),
+]) ?>
+
+= Assignments::widget(['userId' => $user->id]) ?>
+
+endContent() ?>
diff --git a/lib/User/resources/views/admin/_info.php b/lib/User/resources/views/admin/_info.php
new file mode 100644
index 0000000..03345a6
--- /dev/null
+++ b/lib/User/resources/views/admin/_info.php
@@ -0,0 +1,58 @@
+
+ *
+ * For the full copyright and license information, please view the LICENSE.md
+ * file that was distributed with this source code.
+ */
+
+/**
+ * @var yii\web\View
+ * @var dektrium\user\models\User
+ */
+?>
+
+beginContent('@dektrium/user/views/admin/update.php', ['user' => $user]) ?>
+
+
+
+ | = Yii::t('user', 'Registration time') ?>: |
+ = Yii::t('user', '{0, date, MMMM dd, YYYY HH:mm}', [$user->created_at]) ?> |
+
+ registration_ip !== null): ?>
+
+ | = Yii::t('user', 'Registration IP') ?>: |
+ = $user->registration_ip ?> |
+
+
+
+ | = Yii::t('user', 'Confirmation status') ?>: |
+ isConfirmed): ?>
+ = Yii::t(
+ 'user',
+ 'Confirmed at {0, date, MMMM dd, YYYY HH:mm}',
+ [$user->confirmed_at]
+ ) ?> |
+
+ = Yii::t('user', 'Unconfirmed') ?> |
+
+
+
+ | = Yii::t('user', 'Block status') ?>: |
+ isBlocked): ?>
+ = Yii::t(
+ 'user',
+ 'Blocked at {0, date, MMMM dd, YYYY HH:mm}',
+ [$user->blocked_at]
+ ) ?>
+ |
+
+ = Yii::t('user', 'Not blocked') ?> |
+
+
+
+
+endContent() ?>
diff --git a/lib/User/resources/views/admin/_menu.php b/lib/User/resources/views/admin/_menu.php
new file mode 100644
index 0000000..efe0bf0
--- /dev/null
+++ b/lib/User/resources/views/admin/_menu.php
@@ -0,0 +1,56 @@
+
+ *
+ * For the full copyright and license information, please view the LICENSE.md
+ * file that was distributed with this source code.
+ */
+
+use yii\bootstrap\Nav;
+
+?>
+
+= Nav::widget([
+ 'options' => [
+ 'class' => 'nav-tabs',
+ 'style' => 'margin-bottom: 15px',
+ ],
+ 'items' => [
+ [
+ 'label' => Yii::t('user', 'Users'),
+ 'url' => ['/user/admin/index'],
+ ],
+ [
+ 'label' => Yii::t('user', 'Roles'),
+ 'url' => ['/rbac/role/index'],
+ 'visible' => isset(Yii::$app->extensions['dektrium/yii2-rbac']),
+ ],
+ [
+ 'label' => Yii::t('user', 'Permissions'),
+ 'url' => ['/rbac/permission/index'],
+ 'visible' => isset(Yii::$app->extensions['dektrium/yii2-rbac']),
+ ],
+ [
+ 'label' => Yii::t('user', 'Create'),
+ 'items' => [
+ [
+ 'label' => Yii::t('user', 'New user'),
+ 'url' => ['/user/admin/create'],
+ ],
+ [
+ 'label' => Yii::t('user', 'New role'),
+ 'url' => ['/rbac/role/create'],
+ 'visible' => isset(Yii::$app->extensions['dektrium/yii2-rbac']),
+ ],
+ [
+ 'label' => Yii::t('user', 'New permission'),
+ 'url' => ['/rbac/permission/create'],
+ 'visible' => isset(Yii::$app->extensions['dektrium/yii2-rbac']),
+ ],
+ ],
+ ],
+ ],
+]) ?>
diff --git a/lib/User/resources/views/admin/_profile.php b/lib/User/resources/views/admin/_profile.php
new file mode 100644
index 0000000..b19012c
--- /dev/null
+++ b/lib/User/resources/views/admin/_profile.php
@@ -0,0 +1,52 @@
+
+ *
+ * For the full copyright and license information, please view the LICENSE.md
+ * file that was distributed with this source code.
+ */
+
+use yii\bootstrap\ActiveForm;
+use yii\helpers\Html;
+
+/**
+ * @var yii\web\View $this
+ * @var dektrium\user\models\User $user
+ * @var dektrium\user\models\Profile $profile
+ */
+
+?>
+
+beginContent('@dektrium/user/views/admin/update.php', ['user' => $user]) ?>
+
+ 'horizontal',
+ 'enableAjaxValidation' => true,
+ 'enableClientValidation' => false,
+ 'fieldConfig' => [
+ 'horizontalCssClasses' => [
+ 'wrapper' => 'col-sm-9',
+ ],
+ ],
+]); ?>
+
+= $form->field($profile, 'name') ?>
+= $form->field($profile, 'public_email') ?>
+= $form->field($profile, 'website') ?>
+= $form->field($profile, 'location') ?>
+= $form->field($profile, 'gravatar_email') ?>
+= $form->field($profile, 'bio')->textarea() ?>
+
+
+
+
+
+
+endContent() ?>
diff --git a/lib/User/resources/views/admin/_user.php b/lib/User/resources/views/admin/_user.php
new file mode 100644
index 0000000..757b50b
--- /dev/null
+++ b/lib/User/resources/views/admin/_user.php
@@ -0,0 +1,20 @@
+
+ *
+ * For the full copyright and license information, please view the LICENSE.md
+ * file that was distributed with this source code.
+ */
+
+/**
+ * @var yii\widgets\ActiveForm $form
+ * @var dektrium\user\models\User $user
+ */
+?>
+
+= $form->field($user, 'email')->textInput(['maxlength' => 255]) ?>
+= $form->field($user, 'username')->textInput(['maxlength' => 255]) ?>
+= $form->field($user, 'password')->passwordInput() ?>
diff --git a/lib/User/resources/views/admin/create.php b/lib/User/resources/views/admin/create.php
new file mode 100644
index 0000000..57036d4
--- /dev/null
+++ b/lib/User/resources/views/admin/create.php
@@ -0,0 +1,86 @@
+
+ *
+ * For the full copyright and license information, please view the LICENSE.md
+ * file that was distributed with this source code.
+ */
+
+use yii\bootstrap\ActiveForm;
+use yii\bootstrap\Nav;
+use yii\helpers\Html;
+
+/**
+ * @var yii\web\View $this
+ * @var dektrium\user\models\User $user
+ */
+
+$this->title = Yii::t('user', 'Create a user account');
+$this->params['breadcrumbs'][] = ['label' => Yii::t('user', 'Users'), 'url' => ['index']];
+$this->params['breadcrumbs'][] = $this->title;
+
+?>
+
+= $this->render('/_alert', [
+ 'module' => Yii::$app->getModule('user'),
+]) ?>
+
+= $this->render('_menu') ?>
+
+
+
+
+
+ = Nav::widget([
+ 'options' => [
+ 'class' => 'nav-pills nav-stacked',
+ ],
+ 'items' => [
+ ['label' => Yii::t('user', 'Account details'), 'url' => ['/user/admin/create']],
+ ['label' => Yii::t('user', 'Profile details'), 'options' => [
+ 'class' => 'disabled',
+ 'onclick' => 'return false;',
+ ]],
+ ['label' => Yii::t('user', 'Information'), 'options' => [
+ 'class' => 'disabled',
+ 'onclick' => 'return false;',
+ ]],
+ ],
+ ]) ?>
+
+
+
+
+
+
+
+ = Yii::t('user', 'Credentials will be sent to the user by email') ?>.
+ = Yii::t('user', 'A password will be generated automatically if not provided') ?>.
+
+ 'horizontal',
+ 'enableAjaxValidation' => true,
+ 'enableClientValidation' => false,
+ 'fieldConfig' => [
+ 'horizontalCssClasses' => [
+ 'wrapper' => 'col-sm-9',
+ ],
+ ],
+ ]); ?>
+
+ = $this->render('_user', ['form' => $form, 'user' => $user]) ?>
+
+
+
+
+
+
+
+
diff --git a/lib/User/resources/views/admin/index.php b/lib/User/resources/views/admin/index.php
new file mode 100644
index 0000000..1a730b8
--- /dev/null
+++ b/lib/User/resources/views/admin/index.php
@@ -0,0 +1,107 @@
+
+ *
+ * For the full copyright and license information, please view the LICENSE.md
+ * file that was distributed with this source code.
+ */
+
+use dektrium\user\models\UserSearch;
+use yii\data\ActiveDataProvider;
+use yii\grid\GridView;
+use yii\helpers\Html;
+use yii\web\View;
+use yii\widgets\Pjax;
+
+/**
+ * @var View $this
+ * @var ActiveDataProvider $dataProvider
+ * @var UserSearch $searchModel
+ */
+
+$this->title = Yii::t('user', 'Manage users');
+$this->params['breadcrumbs'][] = $this->title;
+?>
+
+= $this->render('/_alert', [
+ 'module' => Yii::$app->getModule('user'),
+]) ?>
+
+= $this->render('/admin/_menu') ?>
+
+
+
+= GridView::widget([
+ 'dataProvider' => $dataProvider,
+ 'filterModel' => $searchModel,
+ 'layout' => "{items}\n{pager}",
+ 'columns' => [
+ 'username',
+ 'email:email',
+ [
+ 'attribute' => 'registration_ip',
+ 'value' => function ($model) {
+ return $model->registration_ip == null
+ ? '' . Yii::t('user', '(not set)') . ''
+ : $model->registration_ip;
+ },
+ 'format' => 'html',
+ ],
+ [
+ 'attribute' => 'created_at',
+ 'value' => function ($model) {
+ if (extension_loaded('intl')) {
+ return Yii::t('user', '{0, date, MMMM dd, YYYY HH:mm}', [$model->created_at]);
+ } else {
+ return date('Y-m-d G:i:s', $model->created_at);
+ }
+ },
+ ],
+ [
+ 'header' => Yii::t('user', 'Confirmation'),
+ 'value' => function ($model) {
+ if ($model->isConfirmed) {
+ return '
+ ' . Yii::t('user', 'Confirmed') . '
+
';
+ } else {
+ return Html::a(Yii::t('user', 'Confirm'), ['confirm', 'id' => $model->id], [
+ 'class' => 'btn btn-xs btn-success btn-block',
+ 'data-method' => 'post',
+ 'data-confirm' => Yii::t('user', 'Are you sure you want to confirm this user?'),
+ ]);
+ }
+ },
+ 'format' => 'raw',
+ 'visible' => Yii::$app->getModule('user')->enableConfirmation,
+ ],
+ [
+ 'header' => Yii::t('user', 'Block status'),
+ 'value' => function ($model) {
+ if ($model->isBlocked) {
+ return Html::a(Yii::t('user', 'Unblock'), ['block', 'id' => $model->id], [
+ 'class' => 'btn btn-xs btn-success btn-block',
+ 'data-method' => 'post',
+ 'data-confirm' => Yii::t('user', 'Are you sure you want to unblock this user?'),
+ ]);
+ } else {
+ return Html::a(Yii::t('user', 'Block'), ['block', 'id' => $model->id], [
+ 'class' => 'btn btn-xs btn-danger btn-block',
+ 'data-method' => 'post',
+ 'data-confirm' => Yii::t('user', 'Are you sure you want to block this user?'),
+ ]);
+ }
+ },
+ 'format' => 'raw',
+ ],
+ [
+ 'class' => 'yii\grid\ActionColumn',
+ 'template' => '{update} {delete}',
+ ],
+ ],
+]); ?>
+
+
diff --git a/lib/User/resources/views/admin/update.php b/lib/User/resources/views/admin/update.php
new file mode 100644
index 0000000..7fb4606
--- /dev/null
+++ b/lib/User/resources/views/admin/update.php
@@ -0,0 +1,109 @@
+
+ *
+ * For the full copyright and license information, please view the LICENSE.md
+ * file that was distributed with this source code.
+ */
+
+use dektrium\user\models\User;
+use yii\bootstrap\Nav;
+use yii\web\View;
+
+/**
+ * @var View $this
+ * @var User $user
+ * @var string $content
+ */
+
+$this->title = Yii::t('user', 'Update user account');
+$this->params['breadcrumbs'][] = ['label' => Yii::t('user', 'Users'), 'url' => ['index']];
+$this->params['breadcrumbs'][] = $this->title;
+
+?>
+
+= $this->render('/_alert', [
+ 'module' => Yii::$app->getModule('user'),
+]) ?>
+
+= $this->render('_menu') ?>
+
+
+
+
+
+ = Nav::widget([
+ 'options' => [
+ 'class' => 'nav-pills nav-stacked',
+ ],
+ 'items' => [
+ [
+ 'label' => Yii::t('user', 'Account details'),
+ 'url' => ['/user/admin/update', 'id' => $user->id]
+ ],
+ [
+ 'label' => Yii::t('user', 'Profile details'),
+ 'url' => ['/user/admin/update-profile', 'id' => $user->id]
+ ],
+ ['label' => Yii::t('user', 'Information'), 'url' => ['/user/admin/info', 'id' => $user->id]],
+ [
+ 'label' => Yii::t('user', 'Assignments'),
+ 'url' => ['/user/admin/assignments', 'id' => $user->id],
+ 'visible' => isset(Yii::$app->extensions['dektrium/yii2-rbac']),
+ ],
+ '
',
+ [
+ 'label' => Yii::t('user', 'Confirm'),
+ 'url' => ['/user/admin/confirm', 'id' => $user->id],
+ 'visible' => !$user->isConfirmed,
+ 'linkOptions' => [
+ 'class' => 'text-success',
+ 'data-method' => 'post',
+ 'data-confirm' => Yii::t('user', 'Are you sure you want to confirm this user?'),
+ ],
+ ],
+ [
+ 'label' => Yii::t('user', 'Block'),
+ 'url' => ['/user/admin/block', 'id' => $user->id],
+ 'visible' => !$user->isBlocked,
+ 'linkOptions' => [
+ 'class' => 'text-danger',
+ 'data-method' => 'post',
+ 'data-confirm' => Yii::t('user', 'Are you sure you want to block this user?'),
+ ],
+ ],
+ [
+ 'label' => Yii::t('user', 'Unblock'),
+ 'url' => ['/user/admin/block', 'id' => $user->id],
+ 'visible' => $user->isBlocked,
+ 'linkOptions' => [
+ 'class' => 'text-success',
+ 'data-method' => 'post',
+ 'data-confirm' => Yii::t('user', 'Are you sure you want to unblock this user?'),
+ ],
+ ],
+ [
+ 'label' => Yii::t('user', 'Delete'),
+ 'url' => ['/user/admin/delete', 'id' => $user->id],
+ 'linkOptions' => [
+ 'class' => 'text-danger',
+ 'data-method' => 'post',
+ 'data-confirm' => Yii::t('user', 'Are you sure you want to delete this user?'),
+ ],
+ ],
+ ],
+ ]) ?>
+
+
+
+
+
diff --git a/lib/User/resources/views/mail/confirmation.php b/lib/User/resources/views/mail/confirmation.php
new file mode 100644
index 0000000..75ded1e
--- /dev/null
+++ b/lib/User/resources/views/mail/confirmation.php
@@ -0,0 +1,34 @@
+
+ *
+ * For the full copyright and license information, please view the LICENSE.md
+ * file that was distributed with this source code.
+ */
+
+use yii\helpers\Html;
+
+/**
+ * @var dektrium\user\models\User $user
+ * @var dektrium\user\models\Token $token
+ */
+?>
+
+ = Yii::t('user', 'Hello') ?>,
+
+
+ = Yii::t('user', 'Thank you for signing up on {0}', Yii::$app->name) ?>.
+ = Yii::t('user', 'In order to complete your registration, please click the link below') ?>.
+
+
+ = Html::a(Html::encode($token->url), $token->url) ?>
+
+
+ = Yii::t('user', 'If you cannot click the link, please try pasting the text into your browser') ?>.
+
+
+ = Yii::t('user', 'If you did not make this request you can ignore this email') ?>.
+
diff --git a/lib/User/resources/views/mail/layouts/html.php b/lib/User/resources/views/mail/layouts/html.php
new file mode 100644
index 0000000..cd80b96
--- /dev/null
+++ b/lib/User/resources/views/mail/layouts/html.php
@@ -0,0 +1,64 @@
+
+ *
+ * For the full copyright and license information, please view the LICENSE.md
+ * file that was distributed with this source code.
+ */
+
+/**
+ * @var \yii\web\View $this
+ * @var yii\mail\BaseMessage $content
+ */
+?>
+beginPage() ?>
+
+
+
+
+
+ head() ?>
+
+
+
+
+ |
+
+
+
+
+ |
+ beginBody() ?>
+ = $content ?>
+ endBody() ?>
+ |
+
+
+
+ |
+ |
+
+
+
+
+
+endPage() ?>
diff --git a/lib/User/resources/views/mail/layouts/text.php b/lib/User/resources/views/mail/layouts/text.php
new file mode 100644
index 0000000..097eb30
--- /dev/null
+++ b/lib/User/resources/views/mail/layouts/text.php
@@ -0,0 +1,21 @@
+
+ *
+ * For the full copyright and license information, please view the LICENSE.md
+ * file that was distributed with this source code.
+ */
+
+/**
+ * @var string $content main view render result
+ */
+?>
+
+beginPage() ?>
+beginBody() ?>
+= $content ?>
+endBody() ?>
+endPage() ?>
diff --git a/lib/User/resources/views/mail/reconfirmation.php b/lib/User/resources/views/mail/reconfirmation.php
new file mode 100644
index 0000000..312e166
--- /dev/null
+++ b/lib/User/resources/views/mail/reconfirmation.php
@@ -0,0 +1,37 @@
+
+ *
+ * For the full copyright and license information, please view the LICENSE.md
+ * file that was distributed with this source code.
+ */
+
+use yii\helpers\Html;
+
+/**
+ * @var dektrium\user\models\Token $token
+ */
+?>
+
+ = Yii::t('user', 'Hello') ?>,
+
+
+ = Yii::t(
+ 'user',
+ 'We have received a request to change the email address for your account on {0}',
+ Yii::$app->name
+ ) ?>.
+ = Yii::t('user', 'In order to complete your request, please click the link below') ?>.
+
+
+ = Html::a(Html::encode($token->getUrl()), $token->getUrl()); ?>
+
+
+ = Yii::t('user', 'If you cannot click the link, please try pasting the text into your browser') ?>.
+
+
+ = Yii::t('user', 'If you did not make this request you can ignore this email') ?>.
+
diff --git a/lib/User/resources/views/mail/recovery.php b/lib/User/resources/views/mail/recovery.php
new file mode 100644
index 0000000..a7aadb2
--- /dev/null
+++ b/lib/User/resources/views/mail/recovery.php
@@ -0,0 +1,34 @@
+
+ *
+ * For the full copyright and license information, please view the LICENSE.md
+ * file that was distributed with this source code.
+ */
+
+use yii\helpers\Html;
+
+/**
+ * @var dektrium\user\models\User $user
+ * @var dektrium\user\models\Token $token
+ */
+?>
+
+ = Yii::t('user', 'Hello') ?>,
+
+
+ = Yii::t('user', 'We have received a request to reset the password for your account on {0}', Yii::$app->name) ?>.
+ = Yii::t('user', 'Please click the link below to complete your password reset') ?>.
+
+
+ = Html::a(Html::encode($token->url), $token->url); ?>
+
+
+ = Yii::t('user', 'If you cannot click the link, please try pasting the text into your browser') ?>.
+
+
+ = Yii::t('user', 'If you did not make this request you can ignore this email') ?>.
+
diff --git a/lib/User/resources/views/mail/text/confirmation.php b/lib/User/resources/views/mail/text/confirmation.php
new file mode 100644
index 0000000..e2f7a38
--- /dev/null
+++ b/lib/User/resources/views/mail/text/confirmation.php
@@ -0,0 +1,26 @@
+
+ *
+ * For the full copyright and license information, please view the LICENSE.md
+ * file that was distributed with this source code.
+ */
+
+/**
+ * @var dektrium\user\models\User $user
+ * @var dektrium\user\models\Token $token
+ */
+?>
+= Yii::t('user', 'Hello') ?>,
+
+= Yii::t('user', 'Thank you for signing up on {0}', Yii::$app->name) ?>.
+= Yii::t('user', 'In order to complete your registration, please click the link below') ?>.
+
+= $token->url ?>
+
+= Yii::t('user', 'If you cannot click the link, please try pasting the text into your browser') ?>.
+
+= Yii::t('user', 'If you did not make this request you can ignore this email') ?>.
diff --git a/lib/User/resources/views/mail/text/reconfirmation.php b/lib/User/resources/views/mail/text/reconfirmation.php
new file mode 100644
index 0000000..fdb6c64
--- /dev/null
+++ b/lib/User/resources/views/mail/text/reconfirmation.php
@@ -0,0 +1,29 @@
+
+ *
+ * For the full copyright and license information, please view the LICENSE.md
+ * file that was distributed with this source code.
+ */
+
+/**
+ * @var dektrium\user\models\Token $token
+ */
+?>
+= Yii::t('user', 'Hello') ?>,
+
+= Yii::t(
+ 'user',
+ 'We have received a request to change the email address for your account on {0}',
+ Yii::$app->name
+) ?>.
+= Yii::t('user', 'In order to complete your request, please click the link below') ?>.
+
+= $token->url ?>
+
+= Yii::t('user', 'If you cannot click the link, please try pasting the text into your browser') ?>.
+
+= Yii::t('user', 'If you did not make this request you can ignore this email') ?>.
diff --git a/lib/User/resources/views/mail/text/recovery.php b/lib/User/resources/views/mail/text/recovery.php
new file mode 100644
index 0000000..3ffec17
--- /dev/null
+++ b/lib/User/resources/views/mail/text/recovery.php
@@ -0,0 +1,26 @@
+
+ *
+ * For the full copyright and license information, please view the LICENSE.md
+ * file that was distributed with this source code.
+ */
+
+/**
+ * @var dektrium\user\models\User $user
+ * @var dektrium\user\models\Token $token
+ */
+?>
+= Yii::t('user', 'Hello') ?>,
+
+= Yii::t('user', 'We have received a request to reset the password for your account on {0}', Yii::$app->name) ?>.
+= Yii::t('user', 'Please click the link below to complete your password reset') ?>.
+
+= $token->url ?>
+
+= Yii::t('user', 'If you cannot click the link, please try pasting the text into your browser') ?>.
+
+= Yii::t('user', 'If you did not make this request you can ignore this email') ?>.
diff --git a/lib/User/resources/views/mail/text/welcome.php b/lib/User/resources/views/mail/text/welcome.php
new file mode 100644
index 0000000..a9f208c
--- /dev/null
+++ b/lib/User/resources/views/mail/text/welcome.php
@@ -0,0 +1,32 @@
+
+ *
+ * For the full copyright and license information, please view the LICENSE.md
+ * file that was distributed with this source code.
+ */
+
+/**
+ * @var dektrium\user\models\User
+ */
+?>
+= Yii::t('user', 'Hello') ?>,
+
+= Yii::t('user', 'Your account on {0} has been created', Yii::$app->name) ?>.
+enableGeneratingPassword): ?>
+= Yii::t('user', 'We have generated a password for you') ?>:
+= $user->password ?>
+
+
+
+= Yii::t('user', 'In order to complete your registration, please click the link below') ?>.
+
+= $token->url ?>
+
+= Yii::t('user', 'If you cannot click the link, please try pasting the text into your browser') ?>.
+
+
+= Yii::t('user', 'If you did not make this request you can ignore this email') ?>.
diff --git a/lib/User/resources/views/mail/welcome.php b/lib/User/resources/views/mail/welcome.php
new file mode 100644
index 0000000..79da04e
--- /dev/null
+++ b/lib/User/resources/views/mail/welcome.php
@@ -0,0 +1,48 @@
+
+ *
+ * For the full copyright and license information, please view the LICENSE.md
+ * file that was distributed with this source code.
+ */
+
+use yii\helpers\Html;
+
+/**
+ * @var dektrium\user\Module $module
+ * @var dektrium\user\models\User $user
+ * @var dektrium\user\models\Token $token
+ * @var bool $showPassword
+ */
+
+?>
+
+ = Yii::t('user', 'Hello') ?>,
+
+
+
+ = Yii::t('user', 'Your account on {0} has been created', Yii::$app->name) ?>.
+ enableGeneratingPassword): ?>
+ = Yii::t('user', 'We have generated a password for you') ?>: = $user->password ?>
+
+
+
+
+
+
+ = Yii::t('user', 'In order to complete your registration, please click the link below') ?>.
+
+
+ = Html::a(Html::encode($token->url), $token->url); ?>
+
+
+ = Yii::t('user', 'If you cannot click the link, please try pasting the text into your browser') ?>.
+
+
+
+
+ = Yii::t('user', 'If you did not make this request you can ignore this email') ?>.
+
diff --git a/lib/User/resources/views/profile/show.php b/lib/User/resources/views/profile/show.php
new file mode 100644
index 0000000..076ff3e
--- /dev/null
+++ b/lib/User/resources/views/profile/show.php
@@ -0,0 +1,51 @@
+
+ *
+ * For the full copyright and license information, please view the LICENSE.md
+ * file that was distributed with this source code.
+ */
+
+use yii\helpers\Html;
+
+/**
+ * @var \yii\web\View $this
+ * @var \dektrium\user\models\Profile $profile
+ */
+
+$this->title = empty($profile->name) ? Html::encode($profile->user->username) : Html::encode($profile->name);
+$this->params['breadcrumbs'][] = $this->title;
+?>
+
+
+
+
+ = Html::img($profile->getAvatarUrl(230), [
+ 'class' => 'img-rounded img-responsive',
+ 'alt' => $profile->user->username,
+ ]) ?>
+
+
+
= $this->title ?>
+
+ location)): ?>
+ - = Html::encode($profile->location) ?>
+
+ website)): ?>
+ - = Html::a(Html::encode($profile->website), Html::encode($profile->website)) ?>
+
+ public_email)): ?>
+ - = Html::a(Html::encode($profile->public_email), 'mailto:' . Html::encode($profile->public_email)) ?>
+
+ - = Yii::t('user', 'Joined on {0, date}', $profile->user->created_at) ?>
+
+ bio)): ?>
+
= Html::encode($profile->bio) ?>
+
+
+
+
+
diff --git a/lib/User/resources/views/recovery/request.php b/lib/User/resources/views/recovery/request.php
new file mode 100644
index 0000000..7635380
--- /dev/null
+++ b/lib/User/resources/views/recovery/request.php
@@ -0,0 +1,45 @@
+
+ *
+ * For the full copyright and license information, please view the LICENSE.md
+ * file that was distributed with this source code.
+ */
+
+use yii\helpers\Html;
+use yii\widgets\ActiveForm;
+
+/*
+ * @var yii\web\View $this
+ * @var yii\widgets\ActiveForm $form
+ * @var dektrium\user\models\RecoveryForm $model
+ */
+
+$this->title = Yii::t('user', 'Recover your password');
+$this->params['breadcrumbs'][] = $this->title;
+?>
+
+
+
+
+
= Html::encode($this->title) ?>
+
+
+ 'password-recovery-form',
+ 'enableAjaxValidation' => true,
+ 'enableClientValidation' => false,
+ ]); ?>
+
+ = $form->field($model, 'email')->textInput(['autofocus' => true]) ?>
+
+ = Html::submitButton(Yii::t('user', 'Continue'), ['class' => 'btn btn-primary btn-block']) ?>
+
+
+
+
+
+
diff --git a/lib/User/resources/views/recovery/reset.php b/lib/User/resources/views/recovery/reset.php
new file mode 100644
index 0000000..6f29ea3
--- /dev/null
+++ b/lib/User/resources/views/recovery/reset.php
@@ -0,0 +1,45 @@
+
+ *
+ * For the full copyright and license information, please view the LICENSE.md
+ * file that was distributed with this source code.
+ */
+
+use yii\helpers\Html;
+use yii\widgets\ActiveForm;
+
+/*
+ * @var yii\web\View $this
+ * @var yii\widgets\ActiveForm $form
+ * @var dektrium\user\models\RecoveryForm $model
+ */
+
+$this->title = Yii::t('user', 'Reset your password');
+$this->params['breadcrumbs'][] = $this->title;
+?>
+
+
+
+
+
= Html::encode($this->title) ?>
+
+
+ 'password-recovery-form',
+ 'enableAjaxValidation' => true,
+ 'enableClientValidation' => false,
+ ]); ?>
+
+ = $form->field($model, 'password')->passwordInput() ?>
+
+ = Html::submitButton(Yii::t('user', 'Finish'), ['class' => 'btn btn-success btn-block']) ?>
+
+
+
+
+
+
diff --git a/lib/User/resources/views/registration/connect.php b/lib/User/resources/views/registration/connect.php
new file mode 100644
index 0000000..9ed4957
--- /dev/null
+++ b/lib/User/resources/views/registration/connect.php
@@ -0,0 +1,63 @@
+
+ *
+ * For the full copyright and license information, please view the LICENSE.md
+ * file that was distributed with this source code.
+ */
+
+use yii\helpers\Html;
+use yii\widgets\ActiveForm;
+
+/**
+ * @var yii\web\View $this
+ * @var yii\widgets\ActiveForm $form
+ * @var dektrium\user\models\User $model
+ * @var dektrium\user\models\Account $account
+ */
+
+$this->title = Yii::t('user', 'Sign in');
+$this->params['breadcrumbs'][] = $this->title;
+?>
+
+
+
+
+
= Html::encode($this->title) ?>
+
+
+
+
+ = Yii::t(
+ 'user',
+ 'In order to finish your registration, we need you to enter following fields'
+ ) ?>:
+
+
+ 'connect-account-form',
+ ]); ?>
+
+ = $form->field($model, 'email') ?>
+
+ = $form->field($model, 'username') ?>
+
+ = Html::submitButton(Yii::t('user', 'Continue'), ['class' => 'btn btn-success btn-block']) ?>
+
+
+
+
+
+ = Html::a(
+ Yii::t(
+ 'user',
+ 'If you already registered, sign in and connect this account on settings page'
+ ),
+ ['/user/settings/networks']
+ ) ?>.
+
+
+
diff --git a/lib/User/resources/views/registration/register.php b/lib/User/resources/views/registration/register.php
new file mode 100644
index 0000000..a5d774f
--- /dev/null
+++ b/lib/User/resources/views/registration/register.php
@@ -0,0 +1,54 @@
+
+ *
+ * For the full copyright and license information, please view the LICENSE.md
+ * file that was distributed with this source code.
+ */
+
+use yii\helpers\Html;
+use yii\widgets\ActiveForm;
+
+/**
+ * @var yii\web\View $this
+ * @var dektrium\user\models\User $user
+ * @var dektrium\user\Module $module
+ */
+
+$this->title = Yii::t('user', 'Sign up');
+$this->params['breadcrumbs'][] = $this->title;
+?>
+
+
+
+
+
= Html::encode($this->title) ?>
+
+
+ 'registration-form',
+ 'enableAjaxValidation' => true,
+ 'enableClientValidation' => false,
+ ]); ?>
+
+ = $form->field($model, 'email') ?>
+
+ = $form->field($model, 'username') ?>
+
+ enableGeneratingPassword == false): ?>
+ = $form->field($model, 'password')->passwordInput() ?>
+
+
+ = Html::submitButton(Yii::t('user', 'Sign up'), ['class' => 'btn btn-success btn-block']) ?>
+
+
+
+
+
+ = Html::a(Yii::t('user', 'Already registered? Sign in!'), ['/user/security/login']) ?>
+
+
+
diff --git a/lib/User/resources/views/registration/resend.php b/lib/User/resources/views/registration/resend.php
new file mode 100644
index 0000000..d370aa5
--- /dev/null
+++ b/lib/User/resources/views/registration/resend.php
@@ -0,0 +1,44 @@
+
+ *
+ * For the full copyright and license information, please view the LICENSE.md
+ * file that was distributed with this source code.
+ */
+
+use yii\helpers\Html;
+use yii\widgets\ActiveForm;
+
+/*
+ * @var yii\web\View $this
+ * @var dektrium\user\models\ResendForm $model
+ */
+
+$this->title = Yii::t('user', 'Request new confirmation message');
+$this->params['breadcrumbs'][] = $this->title;
+?>
+
+
+
+
+
= Html::encode($this->title) ?>
+
+
+ 'resend-form',
+ 'enableAjaxValidation' => true,
+ 'enableClientValidation' => false,
+ ]); ?>
+
+ = $form->field($model, 'email')->textInput(['autofocus' => true]) ?>
+
+ = Html::submitButton(Yii::t('user', 'Continue'), ['class' => 'btn btn-primary btn-block']) ?>
+
+
+
+
+
+
diff --git a/lib/User/resources/views/security/login.php b/lib/User/resources/views/security/login.php
new file mode 100644
index 0000000..06f8280
--- /dev/null
+++ b/lib/User/resources/views/security/login.php
@@ -0,0 +1,92 @@
+
+ *
+ * For the full copyright and license information, please view the LICENSE.md
+ * file that was distributed with this source code.
+ */
+
+use dektrium\user\widgets\Connect;
+use yii\helpers\Html;
+use yii\widgets\ActiveForm;
+
+/**
+ * @var yii\web\View $this
+ * @var dektrium\user\models\LoginForm $model
+ * @var dektrium\user\Module $module
+ */
+
+$this->title = Yii::t('user', 'Sign in');
+$this->params['breadcrumbs'][] = $this->title;
+?>
+
+= $this->render('/_alert', ['module' => Yii::$app->getModule('user')]) ?>
+
+
+
+
+
+
= Html::encode($this->title) ?>
+
+
+ 'login-form',
+ 'enableAjaxValidation' => true,
+ 'enableClientValidation' => false,
+ 'validateOnBlur' => false,
+ 'validateOnType' => false,
+ 'validateOnChange' => false,
+ ]) ?>
+
+ = $form->field(
+ $model,
+ 'login',
+ ['inputOptions' => ['autofocus' => 'autofocus', 'class' => 'form-control', 'tabindex' => '1']]
+ ) ?>
+
+ = $form
+ ->field(
+ $model,
+ 'password',
+ ['inputOptions' => ['class' => 'form-control', 'tabindex' => '2']]
+ )
+ ->passwordInput()
+ ->label(
+ Yii::t('user', 'Password')
+ .($module->enablePasswordRecovery ?
+ ' (' . Html::a(
+ Yii::t('user', 'Forgot password?'),
+ ['/user/recovery/request'],
+ ['tabindex' => '5']
+ )
+ . ')' : '')
+ ) ?>
+
+ = $form->field($model, 'rememberMe')->checkbox(['tabindex' => '4']) ?>
+
+ = Html::submitButton(
+ Yii::t('user', 'Sign in'),
+ ['class' => 'btn btn-primary btn-block', 'tabindex' => '3']
+ ) ?>
+
+
+
+
+ enableConfirmation): ?>
+
+ = Html::a(Yii::t('user', 'Didn\'t receive confirmation message?'), ['/user/registration/resend']) ?>
+
+
+ enableRegistration): ?>
+
+ = Html::a(Yii::t('user', 'Don\'t have an account? Sign up!'), ['/user/registration/register']) ?>
+
+
+ = Connect::widget([
+ 'baseAuthUrl' => ['/user/security/auth'],
+ ]) ?>
+
+
diff --git a/lib/User/resources/views/settings/_menu.php b/lib/User/resources/views/settings/_menu.php
new file mode 100644
index 0000000..71554ee
--- /dev/null
+++ b/lib/User/resources/views/settings/_menu.php
@@ -0,0 +1,47 @@
+
+ *
+ * For the full copyright and license information, please view the LICENSE.md
+ * file that was distributed with this source code.
+ */
+
+use yii\helpers\Html;
+use yii\widgets\Menu;
+
+/** @var dektrium\user\models\User $user */
+$user = Yii::$app->user->identity;
+$networksVisible = count(Yii::$app->authClientCollection->clients) > 0;
+
+?>
+
+
+
+
+ = Html::img($user->profile->getAvatarUrl(24), [
+ 'class' => 'img-rounded',
+ 'alt' => $user->username,
+ ]) ?>
+ = $user->username ?>
+
+
+
+ = Menu::widget([
+ 'options' => [
+ 'class' => 'nav nav-pills nav-stacked',
+ ],
+ 'items' => [
+ ['label' => Yii::t('user', 'Profile'), 'url' => ['/user/settings/profile']],
+ ['label' => Yii::t('user', 'Account'), 'url' => ['/user/settings/account']],
+ [
+ 'label' => Yii::t('user', 'Networks'),
+ 'url' => ['/user/settings/networks'],
+ 'visible' => $networksVisible
+ ],
+ ],
+ ]) ?>
+
+
diff --git a/lib/User/resources/views/settings/account.php b/lib/User/resources/views/settings/account.php
new file mode 100644
index 0000000..ca1ee4c
--- /dev/null
+++ b/lib/User/resources/views/settings/account.php
@@ -0,0 +1,88 @@
+
+ *
+ * For the full copyright and license information, please view the LICENSE.md
+ * file that was distributed with this source code.
+ */
+
+use yii\helpers\Html;
+use yii\widgets\ActiveForm;
+
+/**
+ * @var $this yii\web\View
+ * @var $form yii\widgets\ActiveForm
+ * @var $model dektrium\user\models\SettingsForm
+ */
+
+$this->title = Yii::t('user', 'Account settings');
+$this->params['breadcrumbs'][] = $this->title;
+?>
+
+= $this->render('/_alert', ['module' => Yii::$app->getModule('user')]) ?>
+
+
+
+ = $this->render('_menu') ?>
+
+
+
+
+
= Html::encode($this->title) ?>
+
+
+ 'account-form',
+ 'options' => ['class' => 'form-horizontal'],
+ 'fieldConfig' => [
+ 'template' => "{label}\n
{input}
\n
{error}\n{hint}
",
+ 'labelOptions' => ['class' => 'col-lg-3 control-label'],
+ ],
+ 'enableAjaxValidation' => true,
+ 'enableClientValidation' => false,
+ ]); ?>
+
+ = $form->field($model, 'email') ?>
+
+ = $form->field($model, 'username') ?>
+
+ = $form->field($model, 'new_password')->passwordInput() ?>
+
+
+
+ = $form->field($model, 'current_password')->passwordInput() ?>
+
+
+
+
+
+
+
+ module->enableAccountDelete): ?>
+
+
+
= Yii::t('user', 'Delete account') ?>
+
+
+
+ = Yii::t('user', 'Once you delete your account, there is no going back') ?>.
+ = Yii::t('user', 'It will be deleted forever') ?>.
+ = Yii::t('user', 'Please be certain') ?>.
+
+ = Html::a(Yii::t('user', 'Delete account'), ['delete'], [
+ 'class' => 'btn btn-danger',
+ 'data-method' => 'post',
+ 'data-confirm' => Yii::t('user', 'Are you sure? There is no going back'),
+ ]) ?>
+
+
+
+
+
diff --git a/lib/User/resources/views/settings/networks.php b/lib/User/resources/views/settings/networks.php
new file mode 100644
index 0000000..1ee1c7d
--- /dev/null
+++ b/lib/User/resources/views/settings/networks.php
@@ -0,0 +1,72 @@
+
+ *
+ * For the full copyright and license information, please view the LICENSE.md
+ * file that was distributed with this source code.
+ */
+
+use dektrium\user\widgets\Connect;
+use yii\helpers\Html;
+
+/*
+ * @var yii\web\View $this
+ * @var yii\widgets\ActiveForm $form
+ */
+
+$this->title = Yii::t('user', 'Networks');
+$this->params['breadcrumbs'][] = $this->title;
+?>
+
+= $this->render('/_alert', ['module' => Yii::$app->getModule('user')]) ?>
+
+
+
+ = $this->render('_menu') ?>
+
+
+
+
+ = Html::encode($this->title) ?>
+
+
+
+
= Yii::t('user', 'You can connect multiple accounts to be able to log in using them') ?>.
+
+ ['/user/security/auth'],
+ 'accounts' => $user->accounts,
+ 'autoRender' => false,
+ 'popupMode' => false,
+ ]) ?>
+
+ getClients() as $client): ?>
+
+ |
+ = Html::tag('span', '', ['class' => 'auth-icon ' . $client->getName()]) ?>
+ |
+
+ = $client->getTitle() ?>
+ |
+
+ = $auth->isConnected($client) ?
+ Html::a(Yii::t('user', 'Disconnect'), $auth->createClientUrl($client), [
+ 'class' => 'btn btn-danger btn-block',
+ 'data-method' => 'post',
+ ]) :
+ Html::a(Yii::t('user', 'Connect'), $auth->createClientUrl($client), [
+ 'class' => 'btn btn-success btn-block',
+ ])
+ ?>
+ |
+
+
+
+
+
+
+
+
diff --git a/lib/User/resources/views/settings/profile.php b/lib/User/resources/views/settings/profile.php
new file mode 100644
index 0000000..70b4618
--- /dev/null
+++ b/lib/User/resources/views/settings/profile.php
@@ -0,0 +1,90 @@
+
+ *
+ * For the full copyright and license information, please view the LICENSE.md
+ * file that was distributed with this source code.
+ */
+
+use yii\helpers\Html;
+
+/**
+ * @var yii\web\View $this
+ * @var yii\widgets\ActiveForm $form
+ * @var dektrium\user\models\Profile $profile
+ */
+
+$this->title = Yii::t('user', 'Profile settings');
+$this->params['breadcrumbs'][] = $this->title;
+?>
+
+= $this->render('/_alert', ['module' => Yii::$app->getModule('user')]) ?>
+
+
+
+ = $this->render('_menu') ?>
+
+
+
+
+ = Html::encode($this->title) ?>
+
+
+ 'profile-form',
+ 'options' => ['class' => 'form-horizontal'],
+ 'fieldConfig' => [
+ 'template' => "{label}\n
{input}
\n
{error}\n{hint}
",
+ 'labelOptions' => ['class' => 'col-lg-3 control-label'],
+ ],
+ 'enableAjaxValidation' => true,
+ 'enableClientValidation' => false,
+ 'validateOnBlur' => false,
+ ]); ?>
+
+ = $form->field($model, 'name') ?>
+
+ = $form->field($model, 'public_email') ?>
+
+ = $form->field($model, 'website') ?>
+
+ = $form->field($model, 'location') ?>
+
+ = $form
+ ->field($model, 'timezone')
+ ->dropDownList(
+ \yii\helpers\ArrayHelper::map(
+ \dektrium\user\helpers\Timezone::getAll(),
+ 'timezone',
+ 'name'
+ )
+ ); ?>
+
+ = $form
+ ->field($model, 'gravatar_email')
+ ->hint(
+ \yii\helpers\Html::a(
+ Yii::t('user', 'Change your avatar at Gravatar.com'),
+ 'http://gravatar.com'
+ )
+ ) ?>
+
+ = $form->field($model, 'bio')->textarea() ?>
+
+
+
+
+
+
+
+
diff --git a/lib/User/resources/views/shared/_alert.php b/lib/User/resources/views/shared/_alert.php
new file mode 100644
index 0000000..e31ca24
--- /dev/null
+++ b/lib/User/resources/views/shared/_alert.php
@@ -0,0 +1,32 @@
+
+ *
+ * For the full copyright and license information, please view the LICENSE.md
+ * file that was distributed with this source code.
+ */
+
+use yii\bootstrap\Alert;
+
+/**
+ * @var dektrium\user\Module $module
+ */
+?>
+
+enableFlashMessages): ?>
+
+
+ session->getAllFlashes() as $type => $message): ?>
+
+ = Alert::widget([
+ 'options' => ['class' => 'alert-dismissible alert-'.$type],
+ 'body' => $message
+ ]) ?>
+
+
+
+
+
diff --git a/lib/User/resources/views/shared/message.php b/lib/User/resources/views/shared/message.php
new file mode 100644
index 0000000..990ef2b
--- /dev/null
+++ b/lib/User/resources/views/shared/message.php
@@ -0,0 +1,23 @@
+
+ *
+ * For the full copyright and license information, please view the LICENSE.md
+ * file that was distributed with this source code.
+ */
+
+/**
+ * @var yii\web\View $this
+ * @var dektrium\user\Module $module
+ */
+
+$this->title = $title;
+
+?>
+
+= $this->render('/_alert', [
+ 'module' => $module,
+]);