src/Neuron/GameServer/Player.php
public function startResetAccount ()
    {
        if ($this->isFound ())
        {
            $db = Neuron_Core_Database::__getInstance ();

            $key = md5 (mt_rand (0, 1000000));

            Neuron_GameServer_Mappers_PlayerMapper::setTemporaryKey ($this, $key, time () + 60*60*24);

            // Send the mail
            $text = Neuron_Core_Text::__getInstance ();
            customMail
            (
                $this->getEmail (),
                $text->get ('msubject', 'resetaccount', 'account'),
                $text->getTemplate
                (
                    'email_reset',
                    array
                    (
                        Neuron_Core_Tools::output_varchar ($this->getNickname ()),
                        API_FULL_URL.'reset?id='.$this->getId ().'&certkey='.$key
                    )
                )
            );
        }
    }
public function startResetAccount ()
    {
        if ($this->isFound ())
        {
            $db = Neuron_Core_Database::__getInstance ();

            $key = md5 (mt_rand (0, 1000000));

            Neuron_GameServer_Mappers_PlayerMapper::setTemporaryKey ($this, $key, time () + 60*60*24);

            // Send the mail
            $text = Neuron_Core_Text::__getInstance ();
            customMail
            (
                $this->getEmail (),
                $text->get ('msubject', 'resetaccount', 'account'),
                $text->getTemplate
                (
                    'email_reset',
                    array
                    (
                        Neuron_Core_Tools::output_varchar ($this->getNickname ()),
                        API_FULL_URL.'reset?id='.$this->getId ().'&certkey='.$key
                    )
                )
            );
        }
    }
public function startResetAccount ( ) { if ( $ this -> isFound ( ) ) { $ db = Neuron_Core_Database :: __getInstance ( ) ; $ key = md5 ( mt_rand ( 0 , 1000000 ) ) ; Neuron_GameServer_Mappers_PlayerMapper :: setTemporaryKey ( $ this , $ key , time ( ) + 60 * 60 * 24 ) ; // Send the mail $ text = Neuron_Core_Text :: __getInstance ( ) ; customMail ( $ this -> getEmail ( ) , $ text -> get ( 'msubject' , 'resetaccount' , 'account' ) , $ text -> getTemplate ( 'email_reset' , array ( Neuron_Core_Tools :: output_varchar ( $ this -> getNickname ( ) ) , API_FULL_URL . 'reset?id=' . $ this -> getId ( ) . '&certkey=' . $ key ) ) ) ; } }
/*
This function starts the RESET ACCOUNT procedure.

This function sends a mail to the player and allows
the user to reset his account using a link provided
in the mail.
/ * This function starts the RESET ACCOUNT procedure .