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
thebishop
Worker
Worker



Joined: Aug 30, 2005
Posts: 244
Location: Flying to close to the sun

PostPosted: Wed Nov 16, 2011 7:15 pm Reply with quote

Using the latest ver of ravennuke.

I've been doing a bit of new user registration testing lately and when I approve a new account, it says you have approved the god admins name and then the new users emails address.

Why does RN do this, and how and where do I change the code to make it say "you have approved the new users name" instead ?

I know this seems like a small thing, but I'm anal about stuff like this. Razz

Thanks.
 
View user's profile Send private message
fkelly
Former Moderator in Good Standing



Joined: Aug 30, 2005
Posts: 3312
Location: near Albany NY

PostPosted: Thu Nov 17, 2011 9:00 am Reply with quote

Quote:
You have approved the membership of: franktest (frnkcycle@gmail.com)
An activation email has been sent to the users email address


I can't replicate this one. In the above quote, I registered "franktest" then went in admin and approved it. That's the message I get. The God admin is a different name.
 
View user's profile Send private message Visit poster's website
thebishop







PostPosted: Thu Nov 17, 2011 7:00 pm Reply with quote

It always says the name of my god admin, instead of the new users name.
I will keep testing and see if there is anything that fixes it, and then post back.
 
fkelly







PostPosted: Fri Nov 18, 2011 10:32 am Reply with quote

In Your_Account/admin/approveuserconf.php it does this:

Code:
    list($username, $email, $check_num) = $db->sql_fetchrow($db->sql_query("SELECT username, user_email, check_num FROM ".$user_prefix."_users_temp WHERE user_id='$apr_uid'"));

    $time    = time();
    if ($ya_config['servermail'] == 1) {
        $finishlink    = $nukeurl.'/modules.php?name='.$module_name.'&op=activate&username='.$username.'&check_num='.$check_num.'';
        $message    = _WELCOMETO.' '.$sitename."!\r\n\r\n";
        $message   .= _YOUUSEDEMAIL.' ('.$email.') '._TOREGISTER.' '.$sitename."\r\n\r\n";
        $message   .= _TOFINISHUSER."\r\n\r\n".$finishlink.'';
        $subject    = _ACTIVATIONSUB;
        ya_mail($email, $subject, $message, '');
    }


Can you check your code in your installation and see if it matches. You can see that it is retrieving the username from the users_temp table and then activating that username and using it in the email that is sent. So, unless the GOD username is also in the users_temp table, I don't see how this is happening.

Testing and isolating this stuff can be a p.i.t.a. You need to be totally logged out both as a normal user and as an admin when you go to create a test user account. It would be helpful to have Phpmyadmin running on the side (in another tab) and look at what's created in the users_temp table when you register a new user (and before you go back into admin and approve it). Whatever user name is there should be what is posted in the email after approval.
 
thebishop







PostPosted: Sun Nov 20, 2011 2:51 am Reply with quote

Yes that is the exact code in my file. I think that this may be due to a firefox bug.
I used IE8 and it seems to have worked fine.
 
montego
Site Admin



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

PostPosted: Sun Nov 20, 2011 7:18 am Reply with quote

"firefox bug" Interesting... Have you tried clearing the FF cache, including off-line files? I wonder what it might be doing...

_________________
Where Do YOU Stand?
HTML Newsletter::ShortLinks::Mailer::Downloads and more... 
View user's profile Send private message Visit poster's website
spasticdonkey
RavenNuke(tm) Development Team



Joined: Dec 02, 2006
Posts: 1693
Location: Texas, USA

PostPosted: Sun Nov 20, 2011 10:20 am Reply with quote

I still have issues with firefox on many sites, not properly checking if a newer version of a cached page is available. I have applied a server side fix on my sites which has helped there; but it requires mod_headers and mod_expires enabled.
Code:
<FilesMatch "\.(php|cgi|pl|html)$">

ExpiresActive Off
Header set Cache-Control "private, no-cache, no-store, proxy-revalidate, no-transform"
Header set Pragma "no-cache"
</FilesMatch>


which I added to my .htaccess like so
Code:
<IfModule mod_expires.c>

   ExpiresActive On
   # ExpiresDefault A86400
   ExpiresByType image/x-icon "access plus 1 month"
   ExpiresByType text/css "access plus 5 minutes"
   ExpiresByType image/gif "access plus 1 month"
   ExpiresByType image/png "access plus 1 month"
   ExpiresByType image/jpeg "access plus 1 month"
   ExpiresByType text/plain "access plus 15 minutes"
   ExpiresByType application/x-shockwave-flash "access plus 1 month"
   ExpiresByType video/x-flv "access plus 1 month"
   ExpiresByType application/pdf "access plus 1 month"
   # ExpiresByType text/html "access plus 5 minutes"
   ExpiresByType text/javascript "access plus 5 minutes"
   ExpiresByType application/x-javascript "access plus 5 minutes"
   # Force no caching for dynamic files
<FilesMatch "\.(php|cgi|pl|html)$">
ExpiresActive Off
Header set Cache-Control "private, no-cache, no-store, proxy-revalidate, no-transform"
Header set Pragma "no-cache"
</FilesMatch>
</IfModule>


this will keep php and html pages from caching at all, and I can't think of why you would want those to be cached for any browser... since pages are generated dynamically and will usually be different on each page load. Images and other files will still be cached.
 
View user's profile Send private message Visit poster's website
thebishop







PostPosted: Mon Nov 21, 2011 2:41 am Reply with quote

montego, Yes, when testing things like this, I delete all data to make sure nothing has been cached. I also use FF, IE8 and Opera to test.
 
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 ©