Permalink
Browse files

for eric - logins after the first one do not import - they just dump …

…you at /you/ with a link to import highlighted
  • Loading branch information...
1 parent 9119e12 commit 4b1026e9ea70d267b2fc72599956c9914e7a61e6 @iamcal iamcal committed Jul 23, 2011
Showing with 10 additions and 2 deletions.
  1. +9 −1 auth.php
  2. +1 −1 templates/page_you.txt
View
@@ -99,6 +99,14 @@ function build_url($base_url, $args, $more=array()){
# player is logged in - go and import their avatar
#
- header("location: /checkcookie/?redir=".urlencode('/import/'));
+ $tsid_enc = AddSlashes($ret['player_tsid']);
+
+ list($count) = db_list(db_fetch("SELECT COUNT(*) FROM glitchmash_avatars WHERE player_tsid='$tsid_enc'"));
+
+ if ($count){
+ header("location: /checkcookie/?redir=".urlencode('/you/?login=1'));
+ }else{
+ header("location: /checkcookie/?redir=".urlencode('/import/'));
+ }
exit;
?>
@@ -9,7 +9,7 @@
<p>All of your outfits we know about are listed below. Only your current outfit can be voted on.</p>
- <p>If you've changed your outfit in the wardrobe, <a href="/import/">click here to import the new one</a>.</p>
+ <p{if $smarty.get.login} class="highlight"{/if}>If you've changed your outfit in the wardrobe, <a href="/import/">click here to import the new one</a>.</p>
{/if}
{foreach from=$avatars item='row'}

0 comments on commit 4b1026e

Please sign in to comment.