Questions tagged [yii2-user]

A flexible user management module that handles common tasks such as registration, authentication and password retrieval.

A flexible user management module that handles common tasks such as registrations, authentication and password retrieval.

The full source can be found on Yii2-user Github

The demo site can be found at Yii2-user site

162 questions
9
votes
1 answer

Invalid Configuration – yii\base\InvalidConfigException

I'm using xampp for windows 8 and i have recently installed dektrium/yii2-user. I have followed the installation instructions here: https://github.com/dektrium/yii2-user/blob/master/docs/installation.md The changed part of my web.php looks now like…
Patricia
  • 2,885
  • 2
  • 26
  • 32
8
votes
1 answer

Filter to force lowercase on all operations

I am using Yii2 and attempting to implement a rule on my usernames so that they are always stored and compared in lowercase. If there a rule that I can use to make this possible? For instance, I have a function that checks if username exists in the…
BajaBob
  • 2,643
  • 3
  • 24
  • 26
7
votes
3 answers

Allow only author to edit his post in yii2 using ACF

I am using Access Control Filter for access managing, but can't get one thing done - for example, how can I allow just project manager to update project and forbid it to others? I tried it via matchCallback, but in this case all project managers can…
Kristīne Glode
  • 1,409
  • 4
  • 16
  • 22
7
votes
4 answers

Run initial RBAC migrations as part of a regular app migration

I am building a product that is based on the Yii2 advanced template. As part of this product and its future deployments, I am trying to automatically create the tables related to Authorization in a regular Yii2 migration. E.g, when the end user…
Dzhuneyt
  • 8,437
  • 14
  • 64
  • 118
7
votes
3 answers

yii2, google outh2 and scope

I am using Yii2, GoogleOAuth and yii2-user extension. I want to receive user google circles and set scope to my config: 'authClientCollection' => [ 'class' => 'yii\authclient\Collection', 'clients' => [ 'google' => [ …
6
votes
2 answers

Invalid validation rule: a rule must specify both attribute names and validator type, in Yii2

In my basic app project, I'm trying to integrate the signup form, I'm getting this error: Invalid validation rule: a rule must specify both attribute names and validator type. My code is here. SignUpForm.php
Mohan Prasad
  • 682
  • 1
  • 9
  • 34
6
votes
1 answer

How to change/update user role? Yii2

I'm using yii2 role based access control (RBAC) system. I defined roles and permissions, defined rules, assigned roles to users. Everything works fine. but i want to update assigned roles to users. For…
devugur
  • 1,339
  • 1
  • 19
  • 25
6
votes
6 answers

authTimeout in Yii2

I am trying to log out user automatically in yii2 after he is idle for a fixed seconds . In web.php I added 'user' => [ 'identityClass' => 'app\models\User', 'enableAutoLogin' => true, 'authTimeout'=>100 …
user7282
  • 5,106
  • 9
  • 41
  • 72
5
votes
1 answer

Yii2 Override find() to add default condition globally

I have to override the method using namespace common\models; use Yii; use yii\db\ActiveQuery; class Addfindcondition extends ActiveQuery { public function init() { $this->andOnCondition([$this->modelClass::tableName() .…
rajwa766
  • 604
  • 13
  • 31
5
votes
2 answers

How to login using two different model or switch identity class in yii2?

I want to allow user login from two different model. Config.php 'user' => [ 'identityClass' => 'app\models\User', //one more class here 'enableAutoLogin' => false, 'authTimeout' => 3600*2, ], LoginForm.php public…
Insane Skull
  • 9,220
  • 9
  • 44
  • 63
5
votes
1 answer

Yii2: exclude specific controller actions from '$this->goBack()'

I have views from various controller actions which are solely to be run from an iframe placed in another view. Currently, when the iframe loads, and I go to the log in page to log in, on success the login controller (using yii2 user module) calls…
Dxx
  • 934
  • 2
  • 11
  • 41
5
votes
1 answer

yii2 + join query in ActiveDataProvider

This is my actual query - $dataProvider = new ActiveDataProvider([ 'query' => UserProfile::find()->with(['user']) ]); 'status' field is exist in user table. So I want to filter data by where status != 0 but it fails. I tried…
Nisarg
  • 85
  • 1
  • 7
5
votes
1 answer

How to customize vendor view files?

In yii2 how do I customize vendor view files without modifying the original view files? I'm using dektrium yii2-user and would like to make a few changes to the login page.
Roger
  • 53
  • 4
5
votes
2 answers

Yii2 Login from DB (Setting unknown property: app\models\User::password_hash)

I want the user authentication in Yii to be based on user table in my database. This is my User model:
user3640056
  • 732
  • 4
  • 13
  • 28
5
votes
1 answer

How to minify Assets in yii2 in basic template?

I am using yii2 basic template. How can I minify the Asset Bundle of my page? I found some documentation regarding minification on http://www.yiiframework.com/doc-2.0/guide-structure-assets.html but was not able to do so.
abhi
  • 177
  • 2
  • 12
1
2 3
10 11