Getting / Updating the User Email

sde

Verified User
Joined
Sep 11, 2004
Messages
215
Location
Temecula, CA
I'm trying to sync up the da info with my datbase of customers and their info.

The only critical ID information i see is the email address. This email address is the one that you see and can update when you view "Site Summary / Statistics / Logs"

When a user updates their information in my custom interface, which function would i use to update this field in da?

Save User Email
-or-
Save User Email for Ticket/Messaging system

my second question is what command do i use to get this email address?
 
thanks. i can't quite get it to work. is this how it should look?
PHP:
<?
$sock = new HTTPSocket;
$sock->connect('1.2.3.4',2222);
$sock->set_login('admin','pass');

$sock->set_method('POST');
$sock->query('/CMD_CHANGE_INFO',
    array(
        'evalue' => '[email protected]',
        'domain' => 'mydomain.com',
        'email' => 'Save'
    ));
$result = $sock->fetch_parsed_body();
?>
 
I'm far from experienced, yet it looks good to me... What exactly is the error (or the output from $result at least, as it should be text in the event of an error)?
 
$result is an array, and $array[0] is all the html to makeup the page, .. in this html, it shows the email as the new email address, .. however when i log into the control panel, it is my old email address.
 
it's cause i was logging in as admin. you need to login as the user for /CMD_CHANGE_INFO.

i think i'm understanding better .. so when i do it from the control panel as admin, it uses CMD_MODIFY_USER

but does this mean i have to pass in ALL those values for CMD_MODIFY_USER in order to just change the email address? or can I just pass in the email address as the third parameter?
 
sde said:
it's cause i was logging in as admin. you need to login as the user for /CMD_CHANGE_INFO.

i think i'm understanding better .. so when i do it from the control panel as admin, it uses CMD_MODIFY_USER

> yes, this is correct

but does this mean i have to pass in ALL those values for CMD_MODIFY_USER in order to just change the email address? or can I just pass in the email address as the third parameter?

I don't know if you'll have to pass all the variables to CMD_MODIFY_USER as admin, but I think that for your purpose it would surely be easier to use CMD_CHANGE_INFO, as at the time of the update the user's name and password should be available to use to login with the API.

HTH
 
Back
Top