Exemplo n.º 1
0
<?php

/* @var $this yii\web\View */
use yii\helpers\Html;
$this->title = 'Login';
$this->params['breadcrumbs'][] = $this->title;
?>
<div class="site-login">
    <h1><?php 
echo Html::encode($this->title);
?>
</h1>

    <?php 
echo \yii\authclient\widgets\AuthChoice::widget(['baseAuthUrl' => ['site/auth']]);
?>

</div>
Exemplo n.º 2
0
$this->params['breadcrumbs'][] = $this->title;
?>

<div class="user-form">
    <h1><?php 
echo Yii::t('app', 'Signup');
?>
</h1>

    <?php 
$form = ActiveForm::begin();
?>

    <br/>
    <?php 
echo AuthChoice::widget(['baseAuthUrl' => ['social']]);
?>

    <?php 
echo $form->field($model, 'name')->textInput(['maxlength' => true]);
?>
    <?php 
echo $form->field($model, 'email')->textInput(['maxlength' => true]);
?>
    <?php 
echo $form->field($model, 'password')->passwordInput();
?>

    <div class="form-group">
        <?php 
echo Html::submitButton(Yii::t('app', 'Signup'), ['class' => 'btn btn-success']);
Exemplo n.º 3
0
<?php

/* @var $this yii\web\View */
use yii\authclient\widgets\AuthChoice;
use yii\bootstrap\Modal;
?>

<?php 
if (Yii::$app->user->isGuest) {
    Yii::$app->user->setReturnUrl(Yii::$app->request->getUrl());
    ?>
    <h4>
        <?php 
    echo Modal::widget(['header' => 'Логин', 'toggleButton' => ['class' => 'btn-link', 'label' => 'Войти', 'onclick' => '$(this).next().find(".modal-body").load("/user/user/login");']]);
    ?>
        |
        <?php 
    echo Modal::widget(['header' => 'Регистрация', 'toggleButton' => ['class' => 'btn-link', 'label' => 'Зарегистрироваться', 'onclick' => '$(this).next().find(".modal-body").load("/user/user/signup");']]);
    ?>
    </h4>
    <?php 
    echo yii\authclient\widgets\AuthChoice::widget(['baseAuthUrl' => ['/user/auth/auth']]);
}
Exemplo n.º 4
0
				<div class="col-sm-offset-3 col-sm-9">
                <?php 
echo Html::submitButton('登录', ['class' => 'btn btn-primary', 'name' => 'login-button']);
?>
				&nbsp;&nbsp;<?php 
echo Html::a('忘记密码了', ['site/forgot-password']);
?>
				</div>
            </div>
            <?php 
ActiveForm::end();
if (intval(Yii::$app->params['settings']['auth_enabled']) === 1) {
    ?>
			<h6 class="login-three-home"><strong>第三方账号直接登录</strong></h6>
			<?php 
    echo \yii\authclient\widgets\AuthChoice::widget(['baseAuthUrl' => ['site/auth'], 'popupMode' => false]);
}
?>
		</div>
	</div>

</div>
<!-- sf-left end -->

<!-- sf-right start -->
<div class="col-md-4 sf-right">
<?php 
echo $this->render('@app/views/common/_right');
?>
</div>
<!-- sf-right end -->
Exemplo n.º 5
0
<?php 
}
if ($this->context->module->registrationEnabled) {
    ?>
            <p style="color:#999;margin:1em 0">
                <?php 
    echo Yii::t('usr', 'Don\'t have an account yet?');
    ?>
                <?php 
    echo Yii::t('usr', 'Go to {link}.', ['link' => Html::a(Yii::t('usr', 'registration'), ['register'])]);
    ?>
            </p>
<?php 
}
if (Yii::$app->has('authClientCollection')) {
    echo \yii\authclient\widgets\AuthChoice::widget(['baseAuthUrl' => ['/usr/auth/popup']]);
}
?>
            <div class="form-group">
                <?php 
echo Html::submitButton(Yii::t('usr', 'Log in'), ['class' => 'btn btn-primary']);
?>
            </div>
        </div>
    </div>

<?php 
ActiveForm::end();
?>
</div><!-- form -->
Exemplo n.º 6
0
ActiveForm::end();
?>
            </div>
        </div>

        <?php 
if ($module->allowRegistration) {
    ?>
            <p class="text-center">
                <?php 
    echo Html::a(Yii::t(Module::I18N_CATEGORY, 'Don\'t have an account yet? Sign up!'), ['/user/registration/signup']);
    ?>
            </p>
        <?php 
}
?>

        <?php 
if (Yii::$app->get('authClientCollection', false)) {
    ?>
            <div>
                <?php 
    echo AuthChoice::widget(['baseAuthUrl' => ['/' . $this->context->module->id . '/security/auth'], 'popupMode' => false]);
    ?>
            </div>
        <?php 
}
?>

    </div>
</div>
Exemplo n.º 7
0
<?php

use Yii;
use yii\helpers\Html;
use yii\authclient\widgets\AuthChoice;
?>

<?php 
if (!Yii::$app->user->isGuest) {
    echo Yii::$app->user->identity->email . ' :: ' . Html::a('Logout', ['/account/auth/logout']);
} else {
    echo AuthChoice::widget(['baseAuthUrl' => ['auth/oauthtest']]);
}
Exemplo n.º 8
0
<?php

use yii\authclient\widgets\AuthChoice;
use yii\helpers\Html;
/* @var $this yii\web\View */
/* @var $model app\models\User */
$this->title = Yii::$app->user->isGuest ? Yii::t('app', 'Signup') : Yii::t('app', 'Create User');
$this->params['breadcrumbs'][] = ['label' => Yii::t('app', 'Users'), 'url' => ['index']];
$this->params['breadcrumbs'][] = $this->title;
?>
<div class="user-create">

    <h1><?php 
echo Html::encode($this->title);
?>
</h1>

    <?php 
if (Yii::$app->user->isGuest) {
    echo '<br/>' . AuthChoice::widget(['baseAuthUrl' => ['social']]);
}
?>
    <?php 
echo $this->render('_form', ['model' => $model]);
?>

</div>
Exemplo n.º 9
0
/* @var $this View */
$model = Yii::$app->user->identity;
$this->title = "{$model->displayName} #{$model->id}";
$this->params['breadcrumbs'][] = ['label' => Yii::t(Module::I18N_CATEGORY, 'Profile'), 'url' => ['view']];
$this->params['breadcrumbs'][] = $this->title;
?>

<?php 
echo DetailView::widget(['model' => $model, 'attributes' => ['username', 'email:email', 'statusName', 'created_at:datetime', 'updated_at:datetime', 'confirmed_on:datetime']]);
?>

<?php 
if ($model->userAccounts) {
    ?>
    <h2>Linked accounts</h2>
    <?php 
    echo GridView::widget(['dataProvider' => new ArrayDataProvider(['allModels' => $model->userAccounts]), 'columns' => ['provider', 'client_id', 'token_create_time:datetime', 'expires:datetime', ['value' => function ($model) {
        $data = json_decode($model->attributes);
        $text = VarDumper::dumpAsString((array) $data, 10, true);
        return $text;
    }, 'format' => 'raw']]]);
}
?>
    
<?php 
if (Yii::$app->get('authClientCollection', false)) {
    ?>
<h2>Account linking</h2>
    <?php 
    echo DetailView::widget(['model' => $model, 'attributes' => [['label' => 'Link accounts', 'format' => 'raw', 'value' => AuthChoice::widget(['baseAuthUrl' => ['/' . $this->context->module->id . '/security/auth'], 'popupMode' => false])]]]);
}
Exemplo n.º 10
0
							<?php 
    echo Html::a(Yii::t('user', 'Forgot your password?'), Yii::$app->urlManager->createUrl('//user/recovery/recover-password'));
    ?>
						</small>
					</div>
				<?php 
}
?>
			</div>

			<?php 
if ($canRegister == 1) {
    ?>
				<hr>
				<?php 
    echo Html::a(Yii::t('user', 'Don\'t have an account?'), Yii::$app->urlManager->createUrl('//user/registration/register'));
    ?>
			<?php 
}
?>

			<?php 
echo AuthChoice::widget(['baseAuthUrl' => ['/user/auth/authenticate']]);
?>

			<?php 
$form::end();
?>
		</div>
	</div>
</div>