Yii Framework Forum: Forgot Password Issue - Yii Framework Forum

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

Forgot Password Issue Rate Topic: -----

#1 User is offline   dexekafenno 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 5
  • Joined: 24-October 17

Posted 24 October 2017 - 04:58 AM

Hi all,
I have an issue with my attempt of successfully creating a ForgotPassword login page reachable from my index.
The project I'm working in has pass through so many programmers so I'm having difficulties trying to figure out which part of the code is preventing me to have success.
Whenever I try to insert a redirecting from the login.php I fail: infact the recuperapassword view (forgotpassword in english) is visible ONLY IF you are logged in (pretty useless). It's like if all the views are blocked if you are NOT logged in. What should I do? Any kind of suggestions and hints are well accepted.
Thank you in advance
login.php
Attached File  login.php (1.45K)
Number of downloads: 1
recuperapassword.php
Attached File  recuperapassword.php (17bytes)
Number of downloads: 2
SiteController.php
Attached File  SiteController.php (3.86K)
Number of downloads: 3
UserController.php
Attached File  UserController.php (4.59K)
Number of downloads: 1
User.php
Attached File  User.php (4.71K)
Number of downloads: 0
0

#2 User is online   softark 

  • Keep It Simple
  • Yii
  • Group: Moderators
  • Posts: 3,370
  • Joined: 16-February 11
  • Location:Japan

Posted 24 October 2017 - 06:48 AM

/* Moved from "2.0" to "1.x" */

Just add a link to the forget password page in the login view script.
0

#3 User is offline   dexekafenno 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 5
  • Joined: 24-October 17

Posted 24 October 2017 - 07:14 AM

View Postsoftark, on 24 October 2017 - 06:48 AM, said:

/* Moved from "2.0" to "1.x" */

Just add a link to the forget password page in the login view script.


THAT is the problem. If I do so, nothing happens except for the url that changes, but the view displayed remains the login one.
0

#4 User is online   softark 

  • Keep It Simple
  • Yii
  • Group: Moderators
  • Posts: 3,370
  • Joined: 16-February 11
  • Location:Japan

Posted 24 October 2017 - 07:57 AM

I see no link to the password page in your "login.php" script.

BTW, please don't attach source files to the post. Share your source code using code tag in the post.
0

#5 User is offline   dexekafenno 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 5
  • Joined: 24-October 17

Posted 25 October 2017 - 02:28 AM

Already tried <a href="<?php echo Yii::app()->createUrl("site/recuperopassword")?>"> Forgot Password?</a>. Still only the url changes, not the page itself
0

#6 User is offline   tri 

  • Elite Member
  • Yii
  • Group: Moderators
  • Posts: 1,824
  • Joined: 20-November 08
  • Location:Stockholm, Sweden

Posted 25 October 2017 - 03:50 AM

View Postdexekafenno, on 25 October 2017 - 02:28 AM, said:

Already tried <a href="<?php echo Yii::app()->createUrl("site/recuperopassword")?>"> Forgot Password?</a>. Still only the url changes, not the page itself


This is the action in your SiteController
	public function actionRecuperapassword(){
		if(Yii::app()->user->isGuest)
		{
		$this->render('recuperapassword');
		}
	}

Correct the typo and try again.
Don't forget to read The Definitive Guide to Yii (1.1 en) (1.1 sv) (2.0 en) | The class reference (1.1) (2.0) has the details
1

#7 User is offline   dexekafenno 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 5
  • Joined: 24-October 17

Posted 25 October 2017 - 10:55 AM

View Posttri, on 25 October 2017 - 03:50 AM, said:

This is the action in your SiteController
	public function actionRecuperapassword(){
		if(Yii::app()->user->isGuest)
		{
		$this->render('recuperapassword');
		}
	}

Correct the typo and try again.


Also this, already tried it. I think there's some kind of issue with the accessRules, but I've already enabled all types of user to perform the "recuperapassword" action..
I'm at a dead point
0

#8 User is online   softark 

  • Keep It Simple
  • Yii
  • Group: Moderators
  • Posts: 3,370
  • Joined: 16-February 11
  • Location:Japan

Posted 26 October 2017 - 07:09 AM

Are you really sure that you corrected the typo? I mean ...

site/recuperopassword
and
function actionRecuperapassword
0

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users