Accounts Validation

Started on the old forum in June 2007 · view the original in the archive · old links redirect here

48 replies · 3,442 views · started 19 years ago · 1 min read

TL;DR · summary of 48 replies
  • - The code provided in the thread can be used to validate users based on their points (plusses).
  • - To implement this, the validation condition should be placed in various parts of the forum like Main Page, Chat, Forums, Buddies, Statistics etc.
  • - For chat functionality, a conditional statement is needed to prevent users without 25 plusses from sending messages.

Written automatically from the replies by a language model on our own server. It can be wrong; the posts below are the source.

9 participants
Guest #43

well i here help people if it is possible for me but you people don't even want to help all i asked was account validation for funmobile can't someone give me that? External image (may be gone)

Well i dont use funmobile... U can overcome this issue abt validating prob to existing users by a small php code that can set the value in that column to validated value. I use a different validating code in both xhtml and wml So thers no prob in doin it on xhtml.

wizard Senior · 493 posts #44

put a new field in user table call it validated int(1) default '0'

create this function in core.php

function isvalidated($uid) {

$sql = mysql_fetch_array(mysql_query("SELECT validated FROM ibwf_users WHERE id='".$uid."'"));

if($sql[0]=="1")
return true;
}else{
return false;
}
}

next u need a page in ur admincp to check for users that arent validated

in a new action of ur choice do this

$count = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_users WHERE validated='0'"));
    if($page=="" || $page<=0)$page=1;
    $num_items = count[0]; //changable
    $items_per_page= 10;
    $num_pages = ceil($num_items/$items_per_page);
    if(($page>$num_pages)&&$page!=1)$page= $num_pages;
    $limit_start = ($page-1)*$items_per_page;

$get = mysql_query("SELECT id, name FROM ibwf_users WHERE validated='0'");
while($getthem = mysql_fetch_array($get))
{
echo "<a href=\"index.php?action=viewuser&who=$getthem[0]&ses=$ses\">$getthem[1]</a>, [url="admproc.php?action=validateuser&who=$getthem[0]&ses=$ses\"]validate user[/url]";
}

    if($page>1)
    {
      $ppage = $page-1;
      echo "<a href=\"admincp.php?action=vusers&page=$ppage&ses=$ses\">«PREV</a> ";
    }
    if($page<$num_pages)
    {
      $npage = $page+1;
      echo "<a href=\"admincp.php?action=vusers&page=$npage&ses=$ses\">Next»</a>";
    }
    echo "
$page/$num_pages
";
    if($num_pages>2)
    {
        $rets = "<form action=\"admincp.php\" method=\"get\">";
      $rets .= "Jump to page<input name=\"page\" format=\"*N\" size=\"3\"/>";
        $rets .= "<input type=\"hidden\" name=\"action\" value=\"$action\"/>";
        $rets .= "<input type=\"hidden\" name=\"ses\" value=\"$ses\"/>";
        $rets .= "<input type=\"submit\" value=\"GO\"/>";
        $rets .= "</form>";

        echo $rets;
    }

in the admin proc validate user

$who = $_GET["who"];
$res = mysql_query("UPDATE ibwf_users SET validated='1' WHERE id='".$who."'");
if($res) {

echo "validated successfully";

}else{

echo "error";

}

and in ur authenticated pages put up top where user should already b logged

 if(islogged($ses)==true) {
if(isvalidated(getuid_ses($ses))) {
//make page to show that user isnt validated
}
}
ori Lead · 512 posts #46

u very rarely find a script secure in php for lava sessions should b stored in users table 2 stop multiple sessions on 1 uid also using mysql_real_escape_string($data) on ur input sql forms will go a long way

wizard Senior · 493 posts #48

yo wizard bro u rock i'm sure now irisblaze cant hack into anybodys funmobile script;)

i didnt put any added security measures, i rly dnt care what the kid does, if wanna hack i wont stop him... nways i said add new field not table

Write your reply now; next you create a free account (or sign in) and it is posted right away. Sign in to reply.

Similar topics

Keyboard shortcuts

g f
Go to forums
g h
Go to your feed
g m
Go to messages
r
Reply (in a topic)
/
Search
j
Next post
k
Previous post
?
This list
Ctrl/⌘ + Enter
Send what you are writing
Ctrl/⌘ + B / I
Bold / italic while writing
Esc
Close