1
coulix
Re: user choose their group
  • 2005/2/10 10:31

  • coulix

  • Just popping in

  • Posts: 25

  • Since: 2005/1/18


should is tick to the brutal table insertion



2
coulix
Re: user choose their group
  • 2005/2/10 6:21

  • coulix

  • Just popping in

  • Posts: 25

  • Since: 2005/1/18


also if i wanted to display a specific message if its the first time a user loged himself how can i do this ?



3
coulix
user choose their group
  • 2005/2/10 6:15

  • coulix

  • Just popping in

  • Posts: 25

  • Since: 2005/1/18


hi i would like the user to be able to pick themself their group between selected groups (no webmaster or admin ).
Is there a way to do this nicely, instead of hacking the registration form to update the xoops_group_link table ?

thks



4
coulix
Re: get email of a user
  • 2005/2/9 21:17

  • coulix

  • Just popping in

  • Posts: 25

  • Since: 2005/1/18


help



5
coulix
get email of a user
  • 2005/2/9 13:15

  • coulix

  • Just popping in

  • Posts: 25

  • Since: 2005/1/18


Hi,
i create a small module,
however when i use <{$xoops_url}> or <{$xoops_uname}>
the code displayed not he value.
i need the email of the user currently loged (my own in that case)

i edit headers.php to get email as a xoop var, but that does not change the problem.

thanks



6
coulix
Re: Mass Registering module, what about activation :/
  • 2005/2/5 21:39

  • coulix

  • Just popping in

  • Posts: 25

  • Since: 2005/1/18


thanks a lot :)



7
coulix
Re: Mass Registering module, what about activation :/
  • 2005/2/5 7:06

  • coulix

  • Just popping in

  • Posts: 25

  • Since: 2005/1/18


how is activation working btw ?
any help is more than welcome =))



8
coulix
Mass Registering module, what about activation :/
  • 2005/2/5 6:29

  • coulix

  • Just popping in

  • Posts: 25

  • Since: 2005/1/18


hi, i m doing a small script to registers several users at the same time via a text area box.

i did this code

include("../../mainfile.php");

include(
XOOPS_ROOT_PATH."/header.php");

$xoopsOption['show_rblock'] = 1;



?>



Day 0 - Mass registering Form 


if  ($_POST['Submitted'] == "True") {


$lines explode("rn"$data);


//arrays containing the fiedls value for each row
$studentid;
$firstname;
$lastname;
$email;
$mobile;


foreach (
$lines as $i => $val)
{
    
$temparray explode(","$val);
    foreach (
$temparray as $j => $value)
    {
        switch (
$j) {
            case 
"0" $studentid[$i]=$value; break;
            case 
"1" $firstname[$i]=$value; break;
            case 
"2" $lastname[$i]=$value; break;
            case 
"3" $email[$i]=$value; break;
            case 
"4" $mobile[$i]=$value; break;    
        }
    }
}

//insert into XOOPS db

$host "localhost";
$user "headhunt_coulix";
$pass "pass";
$db "headhunt_xoop1";

$dbh=mysql_connect ($host$user$pass) or die ('I cannot connect to the database because: ' mysql_error());
mysql_select_db ($db);




foreach (
$studentid as $i => $vl) {
    
    
$pass md5($lastname[$i]);
    
$actkey substr(md5(uniqid(mt_rand(), 1)), 08);
    echo 
$pass;
    echo 
"";

    
$query="insert into xoops_users (uid,firstname,name,uname,email,url,user_avatar,user_regdate,user_icq,user_from,user_sig,
                      user_viewemail,actkey,user_aim,user_yim,user_msnm,pass,posts,attachsig,rank,level,theme,
                      timezone_offset,last_login,umode,uorder,notify_method,notify_mode,user_occ,bio,user_intrest,
                      user_mailok,mobile)

         values ('','"
.$firstname[$i]."','','".$studentid[$i]."','".$email[$i]."','','blank.gif',
                '"
.time()."','','','','0','".$actkey."','','','','".$pass."','0','0','0','0','','0','0','nest',
            '0','1','0','','','','0', '"
.$mobile[$i]."'   )" or die ( 'Query Error: ' mysql_error () );
        
    
        
$result mysql_query($query);
}
echo 
"New user inserted ! 

 "
;

@
mysql_close($dbh);

}

else {
 echo 

    Enter a list of fields as follow, each field separated by a coma
    It can be done from an excel csv sheet.

    careful do not add new lines after the last entry.


    student id,firstname,Lastname (used as password),email,mobile
 
    student id,firstname,Lastname (used as password),email,mobile
    
    

    eg : 4125698,john,carmark,john@wherever.org,04563542
    

    


        $PHP_SELF'>
        
         
 

    
    
"
;

}
//end non submitted




include(XOOPS_ROOT_PATH."/footer.php");
// $dbh=mysql_connect ("localhost", "headhunt_xoop1", "") or die ('I cannot connect to the database because: ' . mysql_error());
//mysql_select_db ("headhunt_xoop1");

// <<< EOF

?>


Its working fine but, the accounts are not activited i just touched xoops_user table where is the stuff which ll make them activated?

thank you



9
coulix
Re: basic module following fac, how to give permissions ?
  • 2005/2/3 10:57

  • coulix

  • Just popping in

  • Posts: 25

  • Since: 2005/1/18


its fine now.



10
coulix
Re: basic module following fac, how to give permissions ?
  • 2005/2/3 10:29

  • coulix

  • Just popping in

  • Posts: 25

  • Since: 2005/1/18


its working =)) i dont know what happened :/




TopTop
(1) 2 3 »



Login

Who's Online

198 user(s) are online (112 user(s) are browsing Support Forums)


Members: 0


Guests: 198


more...

Donat-O-Meter

Stats
Goal: AU$15.00
Due Date: Jul 31
Gross Amount: AU$0.00
Net Balance: AU$0.00
Left to go: AU$15.00
Make donations with PayPal!

Latest GitHub Commits