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

Call to a member function getDb() on null

I'm using Yii2 Framework and dektrium/yii2-user module to handle authentication in restful environment. This is my API directory structure: api ├── config │   ├── api.php │   ├── bootstrap.php │   ├── params.php │   └── routes.php ├── index.php ├──…
Ali Tavafi
  • 443
  • 1
  • 10
  • 28
4
votes
3 answers

Yii2 Class yii\authclient\clients\GoogleOAuth does not exist

I use dektrium/yii2-user (on one project) and yiisoft/yii2-authclient (on another one) to login via Google account. Some time ago it was everything ok, but i guess after last composer update something was changed and now i get an error: "Class…
Iana Tempos
  • 582
  • 4
  • 13
4
votes
2 answers

Invalid Cofiguration - yii\base\InvalidConfigException - Yii2

I've just installed Yii2-User module/Dektrium to my Yii2-app-basic application by this command composer require "dektrium/yii2-user:0.9.*@dev" config/console.php return [ . . 'modules' => [ 'gii' => 'yii\gii\Module', …
Nana Partykar
  • 10,556
  • 10
  • 48
  • 77
4
votes
1 answer

Yii 2.0: Sorting on column in a GridView

$dataProvider = new ActiveDataProvider([ 'query' => UserProfile::find()->joinWith(['user'])->where(['<>', 'user.status', 0]), 'sort' => ['attributes' => ['fullname', 'phone', …
4
votes
3 answers

Yii 2 custom component in application configuration file

I have declared a class class MyClass extends Component { public $prop1; public $prop2; public function __construct($param1, $param2, $config = []) { // ... initialization before configuration is applied …
sudip
  • 2,781
  • 1
  • 29
  • 41
4
votes
2 answers

Yii2: call custom method in class User from view

I would like to extend my own user model, with a function called getFirstname. The function should return a custom field in the database. But when I extend the user model. It says "Calling unknown method: yii\web\User::getFirstname()" My user…
Anders Andersen
  • 2,377
  • 2
  • 17
  • 25
4
votes
1 answer

Object not found when accessing yii2 controller methods

Hi I'm a new bie to YII 2 framework, I'm currently learning from following tutorial http://www.yiiframework.com/wiki/490/creating-a-simple-crud-app-with-yii2-revised-12-20-2013/ Everything worked well but when I created a function within…
FR STAR
  • 662
  • 4
  • 24
  • 50
3
votes
1 answer

Yii2 Logout admin part doesnt work correct

I used Yii2 advanced. Everyhting is working well but only logout in my admin panel do not working correctly. When i click Logout, it is render me to index.php and do not log me out, second click ot log out it render me to login.php , but when i try…
Jeni Vasileva
  • 768
  • 6
  • 26
3
votes
1 answer

Yii2 - How to get the current username or name from Yii::$app->user?

How do you add, or get, variables using Yii::$app->user->something? I don't want to get them through identity. I want to make specific ones accessible through user. For example, I want to get the current logged in user's username and…
Wade
  • 3,757
  • 2
  • 32
  • 51
3
votes
1 answer

How to Extend Yii2-user dektrium profile model to be able to adding more fields

I need to override the default Profile model. I have managed to add the fields i need but there is something i am missing since. On insert and update these fields are not getting update to the database. I have created the necessary migrations so i…
chapskev
  • 972
  • 9
  • 27
3
votes
3 answers

Get User Profile - dektrium/yii2-user Yii2

I have used dektrium/yii2-user in my application. And there is a method named getID() in User.php of vendor/dektrium and this method can be accessed by Yii::$app->user->getID() and returns id of the logged in user. However, there is another method…
Choxx
  • 945
  • 1
  • 24
  • 46
3
votes
1 answer

how to disable update in gridview for pjax in yii2?

I am new in yii2, Right now i am creating sample crud appliacation. I used pjax for gridview, It is working fine for me, My problem is when i update my row at that time pjax also calling now i want to disable this pjax for update button. How can i…
Nikul Panchal
  • 85
  • 1
  • 11
3
votes
1 answer

Separate users in Yii2's basic template

I am working with Yii2 and just can't separate users. My app has two modules. This is my config from web.php: 'frontendUser' => [ 'class' => 'yii\web\User', 'identityClass' => 'app\models\User', 'enableAutoLogin' => false, …
Andris
  • 175
  • 1
  • 1
  • 7
2
votes
2 answers

Yii2 redirecting to previous page after login

how to redirect the users after login, i tried to use all of these : Yii::$app->request->getReferrer(); // printing the refferrer url to screen $this->redirect(\Yii::$app->request->referrer) return…
WardNsour
  • 313
  • 1
  • 2
  • 16
2
votes
2 answers

Yii2 composer update error authclient

Today i did a composer update on my project. During updating dektrium return error : here is my composer: { "name": "my company", "description": "my company website", "keywords": ["computers", "advanced", "web design"], "homepage": "here is a…
Jeni Vasileva
  • 768
  • 6
  • 26
1
2
3
10 11