Показаны различия между двумя версиями страницы.
— |
axapta:какпрограммноизменитьпароль [2018/04/13 22:43] (текущий) |
||
---|---|---|---|
Строка 1: | Строка 1: | ||
+ | <code java> | ||
+ | static void ChangePassword(Args _args) | ||
+ | { | ||
+ | Dictionary | ||
+ | userInfo | ||
+ | str 20 OriginalPassword; | ||
+ | ; | ||
+ | dictionary = new Dictionary(); | ||
+ | ttsbegin; | ||
+ | select forupdate userInfo | ||
+ | where userInfo.id == ' | ||
+ | OriginalPassword = userInfo.password; | ||
+ | userInfo.password = dictionary.buildPassword(' | ||
+ | ' | ||
+ | userInfo.update(); | ||
+ | ttscommit; | ||
+ | // Now the password of the user ' | ||
+ | // You can now login as ' | ||
+ | // You can now login as ' | ||
+ | // ... your code here | ||
+ | |||
+ | ttsbegin; | ||
+ | select forupdate userInfo | ||
+ | where userInfo.id == ' | ||
+ | userInfo.password = OriginalPassword; | ||
+ | userInfo.update(); | ||
+ | ttscommit; | ||
+ | // Now the password of the user ' | ||
+ | originally was | ||
+ | } | ||
+ | </ |