• 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: Custom PHP Code - contents of $user_data

Custom PHP Code - contents of $user_data 9 years 11 months ago #27618

I'm trying to write a PHP script to execute in the Custom PHP area of RS Membership. What are the contents of the $user_data array, and what is the syntax to access elements in the array?
The administrator has disabled public write access.

Custom PHP Code - contents of $user_data 9 years 7 months ago #28746

I figure this might be helpful to people searching in these forums for CUSTOM PHP solutions.

The content of $user_data I found by emailing it to myself:
$string = '';
foreach($user_data as $key=>$value) {
 
        $string .= $key .':' . $value . ", \r\n";
       }
$to      = 'your@emailaddress';
$subject = 'subject';
$message = $string;
$headers = 'From: yoursending@emailaddress' . "\r\n" .
    'Reply-To: yoursending@emailaddress' . "\r\n" .
    'X-Mailer: PHP/' . phpversion();
 
mail($to, $subject, $message, $headers);

The other thing is the process is actioned via an eval() statement, so you may or may not run into some unique consideration dealing with that.

Also the $user_data and other variables are objects, not arrays as you might expect.
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!