chickenputty
Member
Is it possible to edit a custom column called "uuid" in the xf_user table when registering a user?
Not unless you edit the code, XenAPI does not modify the XenForo database in any way, you'd have to add that yourself.Is it possible to edit a custom column called "uuid" in the xf_user table when registering a user?
I'll do some testing when I get home tonight, I can't recall if I implemented that or not, I'll get back to you later tonight.Im having a strange issue with the API where account confirmation emails are not being sent to users who I register using the 'register' action.
I know emails are working fine since they are sent via SendGrid and there are no logs of a message getting send, also other emails (such as test emails) work fine.
I should also note that the emails are received when I register a user directly via the site itself.
Any thoughts/feedback to a solution would be appreciated,
Thanks!
Fantastic thank you!I'll do some testing when I get home tonight, I can't recall if I implemented that or not, I'll get back to you later tonight.
Sorry about the late reply, but I reckon I have fixed the email issue: https://github.com/Contex/XenAPI/commit/1ec9e71ffcb4ca90478205eef5b3dd949dab7d01Fantastic thank you!
Sorry about the late reply, but I reckon I have fixed the email issue: https://github.com/Contex/XenAPI/commit/1ec9e71ffcb4ca90478205eef5b3dd949dab7d01
Could you give it a try?
https://raw.githubusercontent.com/Contex/XenAPI/fixes-1.4/net/xenapi/XenAPI/api.php
Glad to hear !Works like a charm! Good work Context - thank you for fixing so quickly!
Sadly, that's one of the few things which is not implemented as I reckon that would involve storing the avatar.Hey Context, is is possible to set a users avatar from a specific url with the API? For example http://www.example.com/avatars/user1.png
Thanks!
Ah thats a shame, it probably would involve storage but wouldn't xenforo have to do that anyway when they are uploaded?Sadly, that's one of the few things which is not implemented as I reckon that would involve storing the avatar.
Of course, but I have always prefered not to allow remote resources (like storing an image). If something breaks and someone uploads a PHP shell, that'd be my fault.Ah thats a shame, it probably would involve storage but wouldn't xenforo have to do that anyway when they are uploaded?
Yeah sure thanks!Of course, but I have always prefered not to allow remote resources (like storing an image). If something breaks and someone uploads a PHP shell, that'd be my fault.
Either way, I'll take a look when I have some time, could you open an issue on GitHub for it?
You should always encode the parameters before sending a http request. See urlencode() if you're using PHP.Is there anyway to authenticate users with special characters in their passwords?
Im not using php, i'm using C#. I tried System.Web.HttpUtility.UrlEncode and it doesn't seem to work.You should always encode the parameters before sending a http request. See urlencode() if you're using PHP.
That should already be possible?@Contex Any chance of making an auth for email/password?
/**
* Returns the User class of the $input parameter.
*
* The $input parameter can be an user ID, username or e-mail.
* Returns FALSE if $input is NULL.
*/
public function getUser($input, $fetchOptions = array()) {
if (!empty($fetchOptions['custom_field'])) {
$results = $this->getDatabase()->fetchRow("SELECT `user_id` FROM `xf_user_field_value` WHERE `field_id` = '" . $fetchOptions['custom_field'] . "' AND `field_value` = '$input'");
if (!empty($results['user_id'])) {
$input = $results['user_id'];
}
}
if ($input == FALSE || $input == NULL) {
return FALSE;
} else if (is_numeric($input)) {
// $input is a number, grab the user by an ID.
$user = new User($this->models, $this->models->getUserModel()->getUserById($input, $fetchOptions));
if (!$user->isRegistered()) {
// The user ID was not found, grabbing the user by the username instead.
$user = new User($this->models, $this->models->getUserModel()->getUserByName($input, $fetchOptions));
}
} else if ($this->models->getUserModel()->couldBeEmail($input)) {
// $input is an e-mail, return the user of the e-mail.
$user = new User($this->models, $this->models->getUserModel()->getUserByEmail($input, $fetchOptions));
} else {
// $input is an username, return the user of the username.
$user = new User($this->models, $this->models->getUserModel()->getUserByName($input, $fetchOptions));
}
if ($user->isRegistered()) {
$this->getModels()->checkModel('user_field', XenForo_Model::create('XenForo_Model_UserField'));
$user->data['custom_fields'] = $this->getModels()->getModel('user_field')->getUserFieldValues($user->getID());
}
return $user;
}
Important update!
1.4.1 and lower versions have a SQL injection exploit with the getGroups and getUsers actions. See below for more information.
Do note that some of the actions are still not documented.
You can now:
We use essential cookies to make this site work, and optional cookies to enhance your experience.