Loading...
 
Features / Usability

Features / Usability


Recreating the account validation link.

posts: 214

On one of my Tiki installations I have "Validate users by email" selected. When someone registers, they are sent an email with an account validation link. When they click on the link, it validates their account and logs them in for the first time.

A lot of the account validation emails seem to get lost. I think they are being rejected as spam. I have notices in the registration to be sure to whitelist the site, but even if they do it, it probably doesn't get done until after they have already been sent the account validation email. (I don't think most people would stop in the middle of registration and go set their whitelist before continuing with the registration).

To be able to recreate the account validation link, I added a database user that can read the TikiWiki database. Then used "Admin DSN" to set the database and user for the SQL Plugin. Then I have the following SQL Plugin coded on a wiki page:

{SQL(db=>twrdr)} select CONCAT("http://yourdomainname.com/tiki-login_validate.php~036~user=",login,"~038~pass=",valid) as "Un-validated users" from `users_users` where valid IS NOT NULL; {SQL}

Now, if someone tells me they did not get the account validation email, I can recreate the validation link and send it to them.

This is a security risk, be sure to protect the wiki page you put this on so that only an admin can access it. Anyone that can get that link could log in as that user. It might be better to copy and save the plugin code and only enter it in the sandbox so it is not available on a wiki page. And when you create the DSN you have to assign permission so it can be used, tiki_p_dsn_twrdr in the case of this example. That permission should probably only be given to the admins group.

Update: Now I just use phpmyadmin and the SQL:

Copy to clipboard
select CONCAT("http://yourdomainname.com/tiki-login_validate.php?user=",login,"&pass=",valid) as "Un-validated users" from `users_users` where valid IS NOT NULL

That displays the user validation links for all un-validated users.

There are no comments at this time.