Ravens PHP Scripts: Forums
 

 

View next topic
View previous topic
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> v2.4 RN Issues
Author Message
crypto
Worker
Worker



Joined: Aug 02, 2004
Posts: 165

PostPosted: Tue Dec 07, 2010 12:51 pm Reply with quote

Hi!

Do you know what could be wrong when user(s) cannot change their email address? Everything 'seems to be ok' (no errors), but address wont be changed.

/modules.php?name=Forums&file=profile&mode=editprofile

// Typo corrected


Last edited by crypto on Sun Dec 04, 2011 8:13 am; edited 1 time in total 
View user's profile Send private message
nuken
RavenNuke(tm) Development Team



Joined: Mar 11, 2007
Posts: 2024
Location: North Carolina

PostPosted: Tue Dec 07, 2010 1:38 pm Reply with quote

For your head js, try this file:
[ Only registered users can see links on this board! Get registered or login! ]

The directory structure should be correct.

For the email changing issue, make sure in Admin Edit Users Configuration Permissions make sure the Allow User Email Change is set to yes.

If it is, the user will have to click the new activation link that is sent to the new email address to make the change happen.

_________________
Tricked Out News 
View user's profile Send private message Send e-mail Visit poster's website
crypto







PostPosted: Tue Dec 07, 2010 2:22 pm Reply with quote

Thanks!


Last edited by crypto on Sun Dec 04, 2011 8:14 am; edited 1 time in total 
nuken







PostPosted: Tue Dec 07, 2010 2:27 pm Reply with quote

If all you needed was the code you posted above, than no you do not need to do anything else. That file will load the js for you.
 
crypto







PostPosted: Tue Dec 07, 2010 2:38 pm Reply with quote

nuken wrote:
For the email changing issue, make sure in Admin Edit Users Configuration Permissions make sure the Allow User Email Change is set to yes.

If it is, the user will have to click the new activation link that is sent to the new email address to make the change happen.


"Allow User Email Change" setting was OFF. I changed it ON but it didn't help.
 
NeapolitanWorld
Involved
Involved



Joined: Nov 06, 2005
Posts: 339
Location: Los Angeles, USA

PostPosted: Tue Dec 07, 2010 2:43 pm Reply with quote

crypto, yes i have this problem as well and had no solution so just disabled it. any time users need a change of e-mail i actually have to do it on the DB

jc

_________________
My Raven Site Neapolitan Mastiff 
View user's profile Send private message
PHrEEkie
Subject Matter Expert



Joined: Feb 23, 2004
Posts: 358

PostPosted: Tue Dec 07, 2010 3:14 pm Reply with quote

As suggested, the email address WON'T be changed until an email validation is clicked through (I'm just repeating that, I'm not actually sure).

My question would be... is the email being sent and received? At which point "doesn't it work"? The email is sent, the validation link clicked, and THEN the email hasn't been changed?

I can fix this easily if you let me know where it's failing. I do recall briefly running across another thread here about this issue. hmm...

- Keith

_________________
PHP - Breaking your legacy scripts one build at a time. 
View user's profile Send private message
crypto







PostPosted: Tue Dec 07, 2010 3:37 pm Reply with quote

nuken wrote:
If all you needed was the code you posted above, than no you do not need to do anything else. That file will load the js for you.

Thanks, it's working fine Smile.
 
crypto







PostPosted: Sun Dec 19, 2010 2:07 am Reply with quote

PHrEEkie wrote:
As suggested, the email address WON'T be changed until an email validation is clicked through (I'm just repeating that, I'm not actually sure).

My question would be... is the email being sent and received? At which point "doesn't it work"? The email is sent, the validation link clicked, and THEN the email hasn't been changed?

I can fix this easily if you let me know where it's failing. I do recall briefly running across another thread here about this issue. hmm...

- Keith


Email is sent and received but it always says that email is taken and cannot be changed. I have checked that the email address is not in use.
 
Palbin
Site Admin



Joined: Mar 30, 2006
Posts: 2583
Location: Pittsburgh, Pennsylvania

PostPosted: Sun Dec 19, 2010 2:59 am Reply with quote

Your_Account/public/changemail,php
Code:


/**************************************************************************/
/* RN Your Account: Advanced User Management for RavenNuke
/* =======================================================================*/
/*
/* Copyright (c) 2008-2009, RavenPHPScripts.com   http://www.ravenphpscripts.com
/*
/* This program is free software. You can redistribute it and/or modify it
/* under the terms of the GNU General Public License as published by the
/* Free Software Foundation, version 2 of the license.
/*
/**************************************************************************/
/* RN Your Account is the based on:
/*  CNB Your Account http://www.phpnuke.org.br
/*  NSN Your Account by Bob Marion, http://www.nukescripts.net
/**************************************************************************/
if (!defined('RNYA')) {
   header('Location: ../../../index.php');
   die();
}
$get_id = isset($_GET['id']) ? intval($_GET['id']) : '';
$check_num = isset($_GET['check_num']) ? check_html($_GET['check_num'], 'nohtml') : '';
$newmail = isset($_GET['mail']) ? check_html($_GET['mail'], 'nohtml') : '';
getusrinfo($user);
include_once 'header.php';
title(_CHANGEMAILTITLE);
opentable();
if ((is_user($user)) AND (strtolower($userinfo['username']) == strtolower($cookie[1])) AND ($userinfo['user_password'] == $cookie[2])) {
   // montego - moved the following block of code here from above as need to make sure is a user first before anything else!
   ya_mailCheck($newmail);
   list($get_username, $tuemail) = $db->sql_fetchrow($db->sql_query('SELECT username, user_email FROM ' . $user_prefix . '_users WHERE user_id = \'' . $get_id . '\''));
   $datekey = date('F Y');
   $check_num2 = substr(md5(hexdec($datekey) * hexdec($userinfo['user_password']) * hexdec($sitekey) * hexdec($newmail) * hexdec($tuemail)) , 2, 10);
   // montego - end of move.
   if ($stop == '') {
      if ((strtolower($userinfo['username']) == strtolower($get_username)) AND ($check_num2 == $check_num)) {
         $result = $db->sql_query('UPDATE ' . $user_prefix . '_users SET user_email=\'' . addslashes($newmail) . '\' WHERE user_id=\'' . $get_id . '\'');
         if ($result) echo _CHANGEMAILOK;
         else echo _CHANGEMAILNOT;
      } else {
         echo _CHANGEMAILNOT;
      }
   } else {
      echo $stop;
   }
} else echo _CHANGEMAILNOTUSER;
closetable();
include_once 'footer.php';

_________________
"Debugging is twice as hard as writing the code in the first place. Therefore, if you write the code as cleverly as possible, you are, by definition, not smart enough to debug it." — Brian W. Kernighan. 
View user's profile Send private message
crypto







PostPosted: Sun Dec 19, 2010 4:20 am Reply with quote

Thanks, now it works. Is this a new fix or have I missed this one?
 
NeapolitanWorld







PostPosted: Sun Dec 19, 2010 10:48 am Reply with quote

Palbin, thank you. This worked for me as well!

jc
 
montego
Site Admin



Joined: Aug 29, 2004
Posts: 9457
Location: Arizona

PostPosted: Mon Dec 20, 2010 8:50 am Reply with quote

Looks to be new to me.

_________________
Where Do YOU Stand?
HTML Newsletter::ShortLinks::Mailer::Downloads and more... 
View user's profile Send private message Visit poster's website
Palbin







PostPosted: Mon Dec 20, 2010 9:42 am Reply with quote

This issue was already an issue in our bug tracking system and I had already corrected it for the next release. I have made this a sticky.
 
Display posts from previous:       
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> v2.4 RN Issues

View next topic
View previous topic
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum


Powered by phpBB © 2001-2007 phpBB Group
All times are GMT - 6 Hours
 
Forums ©