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
0 answers

Getting unknown property: Da\User\Module::isGuest yii2-usuario

I'm install 2amigos/yii2-usuario:~1.5.1 on a yii2-basic-template, using https://yii2-usuario.readthedocs.io/en/latest/. However, it returns this error (Getting unknown property: Da\User\Module::isGuest yii2-usuario) in any view. My…
0
votes
2 answers

Controller / Action for guest users (Does not require authentication) using Yii2-user

I am using Yii2 (basic) and Yii2-user for a website with users. For most actions it's necessary to be authenticated. How could I make a controller / action accessible as a guest? I have tried things like this in the guest's controller: 'rules' => [ …
Dan A.S.
  • 654
  • 8
  • 24
0
votes
1 answer

yii2 disable inbuilt authentication

I have written my own Users model which extends ActiveRecord and implements IdentityInterface and also defined tablename. and implemented all methods. Users.php public static function tableName() { return 'users'; } // other methods…
user
  • 33
  • 11
0
votes
0 answers

How to Get More Details of A record Using Table Relations in Yii2

I have a DepartmentsWokplans Model that belongs to only one CoprprateWorkPlan. The CorporateWorkPlan Model has many CorporateStrategicObjectives. Using a DepartmentWorkplanId, I'm able to the CoprporateStatergicObjectives using the code I have…
0
votes
0 answers

create controllers in subfolders in yii2

i need to put admin controllers in subfolder like this app\controllers\adpanel\AdminsControllers.php also put view in subfolder like this: app\views\adpanel\login.php app\views\adpanel\dashboard.php is this possible?what should i do?
Hamidreza
  • 1
  • 1
0
votes
1 answer

How I get a list of the online users in Yii2?

How do I get the list of the online users in yii2? I want to see who is onlone and who signed out.
0
votes
1 answer

Yii2 Allow access to only specific controllers and restrict access to other controller

I have a yii2 advanced project with many controllers, I want only some controllers to be accessible by users and block access to other controllers. Using access control I can set rules for actions but not controllers, any suggestion please
harsh shah
  • 25
  • 5
0
votes
1 answer

Yii2 - Different persistent login cookie on same domain

I have a domain that has 2 different installs of YII2, lets call them old and new site. If I login to the old site and ask to be remembered, then close the browser and then later go to the new sites login page, I am logged in to new site and it…
Mike
  • 182
  • 1
  • 3
  • 15
0
votes
1 answer

Yii2 PHP Perform checking user with beforeAction in Controller

I'm aware there's a similar post to this but just to confirm my understanding. I just start using Yii2 PHP. I've used dektrium/yii2-user that can login and register. I want to do a beforeAction() to check logged user auth.key if exist in database…
Vincent.L
  • 13
  • 3
0
votes
1 answer

as before request always redirect to login page even for authenticated user

Am implementing authentication in yii2 basic project Login action seems to working fine public function actionLogin() { $this->layout = "login-layout"; if (!Yii::$app->user->isGuest) { return $this->goHome(); } $model =…
Deus chami
  • 52
  • 8
0
votes
1 answer

RBAC Routes add default route of module to all the routes of project?

If I add this configuration of the cms module to the config file 'cms' => [ 'class' => 'yii2mod\cms\Module', 'controllerNamespace' => 'backend\controllers', 'defaultRoute' => '', 'froalaEditorOptions' => [ …
rajwa766
  • 604
  • 13
  • 31
0
votes
1 answer

yii2:why my calender changed to Gregorian after upload?

$time = Yii::t('user', '{0, date, MMMM dd, YYYY HH:mm}', [$model->date]); in my localhost $time is persian (jalali) and after upload $time is english(Gregorian ) how can i change my $time to jalali (perisan)????
Saltern
  • 1,305
  • 2
  • 16
  • 42
0
votes
1 answer

Understanding Yii2 "range" validation rule

I am new to Yii2 Framework and I need to understand the users status. I need to create an app that assign many statuses to the user, comparing to just 2 that Yii2 gave. In Yii2 common\models\Users there are two constants: STATUS_DELETED = 0; and…
sam
  • 853
  • 3
  • 19
  • 50
0
votes
0 answers

How to change yii2-usuario registration module to allow admin to register users

I have the following use case for my system: Registration: Admin registers a new user i.e. email, username and submits. Email is send to the user to confirm with new password. user confirms email, changes password and goes ahead to…
japheth
  • 373
  • 1
  • 10
  • 34
0
votes
0 answers

captcha not working using scenarios in yii2

I am trying to add captcha validation based on scenario, for which I am first retrieving number of failed attempts from database. For which I am using checkattempts() function. Based on the result I am displaying captcha in view and adding scenario…
rji rji
  • 697
  • 3
  • 17
  • 37