![]() |
change password programmatically
Hi,
I'm using vB 3.5.4. I want to change a user's password 'programmatically' (ie from a php program on the same host, but outside vB). How do I do that? Dennis |
Quote:
The vB password is encripted. If you try and change it outside of vB, then vB will not authenticate the new password. |
Quote:
[sql] UPDATE user set password = MD5(concat(MD5('<NEWPASSWORD>'), user.salt)) WHERE userid = <USERID>[/sql] i believe I've got marco to thank for this one. |
Quote:
Maybe I should have just said its not plain text. |
By 'outside vB' I mean programmatically through the vB API, but not a vB page per se.
so I am trying to use a function to change the password and I get this error: Fatal error: Call to a member function query_first() on a non-object in /usr/local/apache/htdocs/forum/includes/functions.php on line 1600 the function body is this: function changepassword($newpw) { global $vbulletin; $vbuser =& datamanager_init('User', $vbulletin, ERRTYPE_ARRAY); $vbuser->set_existing($vbulletin->userinfo); $vbuser->set('password', $newpw); if ($vbuser->errors) { foreach ($vbuser->errors as $error) { echo "<br> error: $error"; } } else { // no errors, so save new vbuser. $vbuserid = $vbuser->save(); } } |
All times are GMT. The time now is 09:01 PM. |
Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|