a quick note:
it is not a good thing to have both plain and www access to your site
redirect from domain.com to www.domain.com (301)


On 12 Mrz., 20:06, "Krissy Masters" <[email protected]>
wrote:
> Not even sure how to ask this question.
>
> Building forgot password function and it was working.
> Then today go back to fix up the view and noticed it no longer works,
> testing looking thru the code all looks good no changes since last version,
> shit on it revert back to older working version same thing not working.
> Close browser, clear cache try it again and now it works, email gets sent to
> me. Then I noticed the url,  that if 'www' is not in the url it will not
> work.http://wwwand everything works.
>
> Debug the data in the controller both spit out same data no errors just no
> email gets sent if the url does not have www in it and I have no clue why
> that is? Has anyone seen this? Know why? Bug?
>
> With or without www I get success An Email was sent! Message but only with
> www do I actually get an email.
>
> function forgot(){
>
> if ($this->RequestHandler->isAjax()) {
>         $this->_ajaxSetup('User');
>                 if (!empty($this->data)) {
>                 $this->User->set($this->data);
>                         if ($this->User->validates()) {
>                                 $this->set('valid', true);
>                                 $userInfo = $this->User->__getUserReset
> ($this->data['User']['emailpass']);
>                                 $this->set('user', $userInfo);
>
>                                 if($this->_sendEmail($userInfo, 'Password
> Reset Information', 'forgot', $userInfo['User']['email'], 'text')) {
>                                         $this->User->id =
> $userInfo['User']['id'];
>                                         $this->User->save($this->data, true,
> $white);
>                                         $this->data = null;
>                                         $message = 'An email has been sent
> to ' . $userInfo['User']['email'] . ' !';
>                                 } else {
>                                         $message = 'Sorry! We encountered a
> problem sending your email. Please try again.';
>
>                                 }
>                                 $response = array('status' => true,'message'
> => $message);
>
>                         } else {
>                                 $errors = $this->User->validationErrors;
>                                 $this->set('errors', $errors);
>                                 $this->set('valid', false);
>                                 $response = array('status' => false,
> 'message' => $errors['emailpass']);
>                 }
>                 }
>                 $this->_ajaxReturn($response);
>         }
>
> }
>
> Thanks,
>
> K

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


To unsubscribe from this group, send email to
[email protected] For more options, visit this group at 
http://groups.google.com/group/cake-php

Reply via email to