Gossamer Forum
Home : Products : Gossamer Links : Discussions :

How do I get the Users Password on the link pages?

Quote Reply
How do I get the Users Password on the link pages?
I've looked all over and I just can't figure out how to show a users password in a link-type page. What I'm trying to do is email a LinkOwner his Username and password. The Username is easy, since it's the same as the LinkOwner, but how do I get the Password out of the Users table?

Thanks!

Bryan
Quote Reply
Re: [BryanL] How do I get the Users Password on the link pages? In reply to
Not quite sure why you are trying to do this... but you could use this (if you have <%LinkOwner%> available)...

<%grab_password($LinkOwner)%>

Code:
sub {

my $user = $_[0];
my $table = $DB->table('Users');
my $pass = $table->select( ['Password'], { Username => $user } )->fetchrow || return $GT::SQL::error;
return $pass;

}

This is untested, but should work :)

Cheers

Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Quote Reply
Re: [Andy] How do I get the Users Password on the link pages? In reply to
Hi Andy,

Would this global work in email-add.txt too? so when end users receives the email of their listing being validated, they also get the password in the email.

Vishal

Vishal
-------------------------------------------------------
Quote Reply
Re: [NeedScripts.Com] How do I get the Users Password on the link pages? In reply to
Should do. Your best bet is to just give it a go :)

Cheers

Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Quote Reply
Re: [BryanL] How do I get the Users Password on the link pages? In reply to
I think for a Links page you can display the password by preceding it as follows:

<%Links::Utils::load_user%>
<%Password%>

If you want to include it in the email that is sent to the Link Owner when their link is validated, you don't need to do anything special. You can just use the <%Password%> tag on the email-add.txt template, and it will include the Password from the Users table.

--Frank
Quote Reply
Re: [FrankM] How do I get the Users Password on the link pages? In reply to
Thanks! That did the trick for me.

The reason I'm using this is in conjunction with Andy's Expired_Link script. When someone upgrades a link, the upgrade lasts for a year.

At the end of a year, I want to email them a notice and include their username and password. Many times people have forgotten after a year, email addresses change, etc. This way, they can log right back in.

Cheers,

Bryan