• 1

Read this first!

We do not monitor these forums. The forum is provided to exchange information and experience with other users ONLY. Forum responses are not guaranteed.

However, please submit a ticket if you have an active subscription and wish to receive support. Our ticketing system is the only way of getting in touch with RSJoomla! and receiving the official RSJoomla! Customer Support.

For more information, the Support Policy is located here.

Thank you!

TOPIC: How to unblock users

How to unblock users 14 years 11 months ago #7497

  • dgzurita
  • dgzurita's Avatar
  • OFFLINE
  • Fresh Boarder
  • Posts: 2
Hi,

i'm trying to unblock users (not yet logged) after complete a form taking his "username" and using the "Script called on form process":

if (isset($_POST))
{
global $database;

$username = $_POST;
$database->setQuery("UPDATE #_users SET `block`='0' WHERE `username`='".$username."'");
$database->query();

}

but it doesn't work. I'm not sure if the sintaxis isn't correct or if there are any problem with the Query.

Thanks!!
The administrator has disabled public write access.

Re:How to unblock users 14 years 11 months ago #7588

  • bogdanc
  • bogdanc's Avatar
  • OFFLINE
  • Moderator
  • Posts: 669
  • Thank you received: 11
Hello,

Try this script in the Scripts called on form process field:
if (isset($_POST['form']['name']))
{
$db =& JFactory::getDBO();
$username = $_POST['form']['name'];
$db->setQuery("UPDATE #__users SET `block`='0' WHERE `username`='".$username."'");
$db->query();
}

I'm sure this one works.

Regards!
The administrator has disabled public write access.

Re:How to unblock users 14 years 11 months ago #7704

  • dgzurita
  • dgzurita's Avatar
  • OFFLINE
  • Fresh Boarder
  • Posts: 2
It works perfectly, thank you very much!!

Regards!!
The administrator has disabled public write access.
  • 1

Read this first!

We do not monitor these forums. The forum is provided to exchange information and experience with other users ONLY. Forum responses are not guaranteed.

However, please submit a ticket if you have an active subscription and wish to receive support. Our ticketing system is the only way of getting in touch with RSJoomla! and receiving the official RSJoomla! Customer Support.

For more information, the Support Policy is located here.

Thank you!