List Info

Thread: writing a module need some help getting user id




writing a module need some help getting user id
user name
2006-12-06 16:12:41
Hi Everyone,

My name is Seizo and I run a music licensing site and I look
forward to 
working with this community.

I'm putting together a module and would love some help. I
have joomla 
1.0.11, and Community Builder 1.0.2. I am surprised how
difficult it has 
been to find a module to do a simple file upload with a few
added fields.

The module is in a music licensing site and it needs to take
the 
following information:
1) user name
2) first name
3) Type of license they want (exclusive, non-exclusive)
4) The fee they would like to charge.
5) The name of the file to upload.

Only registered members (and I'm going to implement a tiered
membership, 
silver, gold etc) may upload files and see the upload form.

The module also needs to confirm that all the information is
there, 
match the user name and first name filled in by user (for
security 
reasons), validate the form, validate the upload, send an
email to the 
administrator that a new upload has been received with all
the relevant 
details and send an email to the user that the upload has
been received.

I have this sort of working but I know it's not the most
elegant 
solution. mod_fileupload (my module) calls an external php
script to 
actually handle the uploading and the email generation, and
prints to 
the screen, on a blank page the success of the upload. The
user then has 
to hit the back button to return to the website or else if I
redirect 
them to the home page, it appears as if they are logged out.
However 
since I don't know how to get the user information to verify
I have to 
take it on faith that the user actually typed in their real
username and 
first name. The reason is it's important is that the file
they send me, 
then gets reviewed by my staff, and if approved, added as a
product to 
the licensing store, and the user gets paid if the product
gets 
licensed, but I need to verify that the user is who they are
and that 
they do not abuse the site, or the upload section to cause
harm.

Does anyone know how to get the user name and first name
from within a 
module on a system using community builder? If I can get
that 
information I should be able to verify and be much happier
with the 
module. Thanks for your help.

Seizo
_______________________________________________
New York PHP SIG: Joomla! Mailing List
http:/
/lists.nyphp.org/mailman/listinfo/joomla

NYPHPCon 2006 Presentations Online
http://www.nyphpcon.com

Show Your Participation in New York PHP
http://ww
w.nyphp.org/show_participation.php
[1]

about | contact  Other archives ( Real Estate discussion Medical topics )