Mysidia Adoptables Support Forum  

Home Community Mys-Script Creative Off-Topic
Go Back   Mysidia Adoptables Support Forum > Mysidia Adoptables > Questions and Supports

Notices

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #14  
Old 04-06-2016, 12:50 PM
NobodysHero's Avatar
NobodysHero NobodysHero is offline
Co-Owner of MystFell
 
Join Date: Nov 2013
Posts: 144
Gender: Female
Credits: 19,127
NobodysHero is on a distinguished road
Default

Okay, so I got the reply from tech support for my web host and they said it's enabled, but I still can't do anything with passwords, sending resets or setting a new one on my own. I even tried to send the email using the form in the ACP and that didn't work.

Here is my forgotpass.php file:
PHP Code:
<?php

use Resource\Native\String as String;

class 
ForgotpassController extends AppController{

    public function 
__construct(){
        
parent::__construct("guest");
    }
    
    public function 
index(){
        
$mysidia Registry::get("mysidia");        
        if(
$mysidia->input->post("submit")){
            
$user $mysidia->db->select("users", array("username""email""ip"), "username = '{$mysidia->input->post("username")}' and email = '{$mysidia->input->post("email")}'")->fetchObject();
            if(!
is_object($user)) throw new PasswordException("match");             
            else{
                
$rand codegen(10);
                
$date = new DateTime;
                
$mysidia->db->insert("passwordresets", array("id" => NULL"username" => $mysidia->input->post("username"), "email" => $mysidia->input->post("email"), "code" => $rand"ip" => $_SERVER['REMOTE_ADDR'], "date" => $date->format('Y-m-d')));

                
$headers "From: {$mysidia->settings->systememail}";    
                
$message "Hello there {$mysidia->input->post("username")}:\n\nOur records indicate that you requested a password reset for your account.  Below is your reset code:\n
                              Reset Code: 
{$rand}\n\nTo have your password changed please visit the following URL:\n
                              
{$mysidia->path->getAbsolute()}forgotpass/reset 
                              \n\nIf you did NOT request a password reset then please ignore this email to keep your current password.\n\n
                              Thanks,\nThe 
{$sitename} team.";
                
mail($mysidia->input->post("email"), "Password Reset Request for {$mysidia->input->post("username")}"$message$headers);
            }
            return;
        }          
    }
    
    public function 
reset(){
        
$mysidia Registry::get("mysidia");        
        if(
$mysidia->input->post("submit")){
            
$passwordResets $mysidia->db->select("passwordresets", array(), "username = '{$mysidia->input->post("username")}' and email = '{$mysidia->input->post("email")}' and code='{$mysidia->input->post("resetcode")}' ORDER BY id DESC LIMIT 1")->fetchObject();    
            if(!
is_object($passwordResets)) throw new InvalidCodeException("invalidcode");        
            else{        
                
$newPass $mysidia->user->reset($passwordResets->username$passwordResets->email); 
                
$this->setField("newPass", new String($newPass));                
            }                 
            return;
        }
    }
}
?>
That I'm aware of, none of the code has been changed from install. I'm at a total loss here and I have a few members who currently can't access their accounts. Any and all help is, was, and will always be appreciated.
Reply With Quote
 


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -5. The time now is 10:49 PM.

Currently Active Users: 321 (0 members and 321 guests)
Threads: 4,080, Posts: 32,024, Members: 2,016
Welcome to our newest members, jolob.
BETA





What's New?

What's Hot?

What's Popular?


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
vBCommerce I v2.0.0 Gold ©2010, PixelFX Studios
vBCredits I v2.0.0 Gold ©2010, PixelFX Studios
Emoticons by darkmoon3636