hi guys im using yii 2.0.22 and im having trouble with the login system , i signup without a glitch to my user table but on login in the system refuses to login ,gives a validation error incorrect password or username . i cant figure out where the problem is. can someone help with this
ii mean when i signup the data is inserted into my database table user , without a problem. but when i want to login using the credential i have just signed in. the system refuses . i have started with advanced template
Iirc, the initial settings for the mailer prevents sending a real email, but it saves a file that represents the content of the sent mail in your ‘runtime’ directory. Check for it and open the link in it to complete the verification.
Well, I’m now trying to install yii2-app-advanced on my local environment. I have no experience with this template so far, because I’ve been a convinced fan of yii2-app-basic.
Anyway, I’m going to try.
My development environment is apache / mariadb / php 7.2 on Windows 10.
composer global require "fxp/composer-asset-plugin:~1.1.1"
composer create-project --prefer-dist yiisoft/yii2-app-advanced yii-application
I believe that the guide is out of date, because the 1st line gave me an error and the 2nd line worked fine in spite of the 1st error.
Preparing application
2.1 run “init”
2.2 create a db
2.3 run “migrate”
2.4 apache configuration
2.5 edit hosts file
Test Drive
3.1 Access frontend … OK
3.2 Signup … OK
I didn’t get confirmation mail. But there is a file named 20190802-211621-3227-4231.eml in the directory of ‘@frontend/runtime/mail’.
3.3 Login w/o email confirmation … NG
I got “Incorrect username or password.” error.
3.4 Email Confirmation … OK
I opened 20190802-211621-3227-4231.eml and click on the link in it, and then I got a message ‘Your email has been confirmed!’ in my web browser.
3.5 Login … OK
So I successfully completed the installation.
Now it’s your turn. Please try installation once again.
i don’t know if im doing anything wrong here but i have followed your instructions, i got the verification link
http:=//localhost/mobile/frontend/web/index.php?r=3Dsite%2Fverify-email&token=3D-=B_rSQ912_jENEMa6u6CaZbJzxrBe323_1564977323
i copied and pasted in my browser but the , the page displays 404 page not found .
is there no work around to completely come up with my own login system
You have to open the *.eml file with a mail client, e.g., Outlook, Window’s Live Mail, or Thunderbird, because it is encoded into a certain file format.
Or, if you have opened it in a text editor, you have to decode it a little.
And as the last resort, you can modify the data in the user table manually. Change status of the user from 9 to 10, which means from STATUS_INACTIVE to STATUS_ACTIVE. Please check @common\models\User.php.