Gossamer Forum
Home : Products : DBMan : Customization :

create a .pass with users who did submit a record

Quote Reply
create a .pass with users who did submit a record
Hi all,

My .pass file tends to grow rather big with ppl signing up but not returning to add a record.
It's a lot of work to clean up the .pass file (to check who in the .pass file has submitted records and who didn't)

Is there a way to print the users with record(s), show permissions (always the same in my case/all but admin) and e-mail adress etc.

So I would get the same format as the .pass file but only with users who actually did submit records? ( I would use this to replace the .pass file and paste users with it who signed up during the last week or so)


Close Watch
LyricZ http://www.lyricz.12inter.net
NL
Quote Reply
Re: create a .pass with users who did submit a record In reply to
Yes...this has been posted before in this forum. Search for donm check delete records in this forum using the And search option and All posts in the Date Range and you should be able to find Threads that discusses how to check active records against the users in the .pass file.

Regards,

Eliot Lee

Quote Reply
Re: create a .pass with users who did submit a record In reply to
I only get this your answer above as a result in the search :)

Close Watch
LyricZ http://www.lyricz.12inter.net
NL
Quote Reply
Re: create a .pass with users who did submit a record In reply to
Guess you missed the following Thread:

http://www.gossamer-threads.com/...=25&Old=allposts

Tongue

Regards,

Eliot

Quote Reply
Re: create a .pass with users who did submit a record In reply to
thx

Close Watch
LyricZ http://www.lyricz.12inter.net
NL
Quote Reply
Re: create a .pass with users who did submit a record In reply to
You're welcome.

Regards,

Eliot Lee

Quote Reply
Re: create a .pass with users who did submit a record In reply to
It gives me a list of users who do have records.
But how do I pull the permissions and password out of the auth file and put them next to their name?

code:
http://www.gossamer-threads.com/...=&vc=1#Post82647


Close Watch
LyricZ http://www.lyricz.12inter.net
NL
Quote Reply
Re: create a .pass with users who did submit a record In reply to
Actually, you got it backwards...the Mod prints out users who do NOT have records stored in the .db file. Thus, you can delete those users via the admin panel.

Good luck!

Regards,

Eliot Lee

Quote Reply
Re: create a .pass with users who did submit a record In reply to
Well ofcourse I rewrote the code a bit.(unless to if)
I know I can delete them through admin panel but about 1200 of them is a little to much.

code so far:
--------------------
sub html_verify_accounts {
# --------------------------------------------------------
my ($pass, @passwd, $userid, $pw, @permissions, $file, $uid);

&html_print_headers;
$page_title = "Accounts With Records";
&html_page_top;

open (DB, "<$db_file_name") or &cgierr("unable to open database: $db_file_name.\nReason: $!");
@lines = <DB>;
close DB;

foreach $line (@lines) {
if ($line =~ /^#/) { next; }
if ($line =~ /^\s*$/) { next; }
chomp ($line);
@values = &split_decode($line);
$user{$values[$auth_user_field]} = 1;

}

open (PASSWD, "<$auth_pw_file") or &cgierr("unable to open password file. Reason: $!\n");
@passwds = <PASSWD>;
close PASSWD;
foreach $pass (@passwds) {
@data = split ":",$pass;
if ($user{$data[0]}) {
push (@list,$data[0]);
}
}



unless ($list[0]) {
print "All users have records in the database";
}

else { print "The following users do have records in the database:<BR>";
foreach $user (@list) {
print "$user <BR>";
}
}


&html_footer;
&html_page_bottom;
}
---------------------eoc

Still keeps my original question at the top very much alive I am afraid

----------------------------
"Is there a way to print the users with record(s), show permissions (always the same in my case/all but admin) and e-mail adress etc.

So I would get the same format as the .pass file but only with users who actually did submit records? ( I would use this to replace the .pass file and paste users with it who signed up during the last week or so)"
----------------------------------------------------------


Close Watch
LyricZ http://www.lyricz.12inter.net
NL
Quote Reply
Re: create a .pass with users who did submit a record In reply to
If you change

push (@list,$data[0]);

to

push (@list,$pass);

That will give you the whole entry from the password file for each user. Then it would just be a matter of printing the @list array to a file.

JPD
http://www.jpdeni.com/dbman/
Quote Reply
Re: create a .pass with users who did submit a record In reply to
Thanx ! That did it !

Close Watch
LyricZ http://www.lyricz.12inter.net
NL