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
0
votes
1 answer

yii2 check user role in behaviour and give access

I am developing an admin panel with multiple user types. I have created an "AgencyBehaviour" for agencies who can update own data. But i need to show superadmin all the data from all agencies. What i have done : i am checking whether the current…
VSaindane
  • 11
  • 2
0
votes
1 answer

Yii2-user: How to create admin user in batch mode?

When deploying my application there is of course always an admin user. How can I create such an admin user as a first user without any interaction ... ... by means of SQL? ... using a Yii2-migration?
WeSee
  • 3,158
  • 2
  • 30
  • 58
0
votes
1 answer

Two totally different frontend users in Yii2 advanced

I'm developing an application using the advanced Yii2 template. I already have two different sessions separated for backend and frontend users. My main.php files are like this: // frontend/config/main.php ... 'user' => [ 'identityClass' =>…
cj_panpet
  • 1
  • 1
  • 1
0
votes
0 answers

Yii2 show activation pending message on login

I am using yii2 advanced for my application. When I login to my application, if user is not activated ( his account status is 0 in user table ), I need show warning message "Account activation Pending".
Biju s
  • 420
  • 1
  • 7
  • 16
0
votes
0 answers

database not update after install extension with composer in yii2 in SQLSRV connection

i used sqlsrv connection in yii2 and gii is worked correct! this is my connection : return [ 'class' => 'yii\db\Connection', 'dsn' => 'sqlsrv:Server=DESKTOP-UCQ1M4B;Database=shopping;ConnectionPooling=0', 'username' => '', 'password'…
Saltern
  • 1,305
  • 2
  • 16
  • 42
0
votes
1 answer

Button in gridview yii2

I've create button view profile at gridview. When user click the button view profile, it will go to profile based on user_id. Here is the code. $dataProvider, 'id' => 'mygrid', 'columns' => [ …
Fyp16
  • 131
  • 1
  • 5
  • 16
0
votes
1 answer

convert to pdf ( yii2)

How to make when user click the profile button,it will display in pdf file. I've install the mpdf extension. Below is the code that I try to convert personalinfo.php page to pdf. class MpdfController extends Controller { public function…
Fyp16
  • 131
  • 1
  • 5
  • 16
0
votes
2 answers

How to save current user_id to database (YII2)

I try to save current user_id to the education table in database. However,the data of user_id is not filled. This is my code. At model public function rules() { return [ [['year',…
Fyp16
  • 131
  • 1
  • 5
  • 16
0
votes
2 answers

Retrieve data from database based on current user login in yii2

How to fetch data from database based on current user login? As example, when user login and click the profile bar, it only display his/her data only. I've tried before but it display all data of user. At personalinfo.php
Fyp16
  • 131
  • 1
  • 5
  • 16
0
votes
1 answer

action download in gridview yii2

I'm very new with YII2. I want to create a download function to the file that was uploaded before. I've referred how to create action download at Gridview in Yii2. However, when I click button download, it load the blank page. Here the code. At…
Fyp16
  • 131
  • 1
  • 5
  • 16
0
votes
1 answer

How to set separate homeUrl for authenticated users and guests in yii2

I'm wondering is it possible to make different homeUrl for authenticated and guest users? I have such rules in SiteController.php public function behaviors() { return [ 'access' => [ 'class' => AccessControl::className(), …
Sakezzz
  • 468
  • 6
  • 16
0
votes
3 answers

Yii2 suggestion for two or more users

I'm beginner to yii2, I want to FOLLOW a suggermento Which way to create two users with different capabilities. Can you give me an example of how to create two types of users? Thanks so much
Saba
  • 115
  • 1
  • 15
0
votes
0 answers

yii2: Backend login makes website go down. Temporarly

At first 1 month when the website was uploaded, both backend and frontend worked fine. Then without any coding changes to the application, frontend is working fine, whenever I tried to login to backend, error pops like "the page isn't redirecting…
0
votes
2 answers

yii2 user dektrium user_id

Hello guys i'm using yii2 user of dektrium . I would save user_id an account in my table. the User table has 1..N relationship with my table. I am a princiapiante and do not know how to save user id in my table. I tried so but the record in the…
Saba
  • 115
  • 1
  • 15
0
votes
1 answer

Undefined index while overriding controller

So in Profile table I created new field named 'rayon_id' which is FK of my new table Rayon's 'id' both model had the relationship coded. In Rayon.php /** * @return \yii\db\ActiveQuery */ public function getProfiles() { return…
exneval
  • 43
  • 1
  • 4