Merge branch 'master' of git://github.com/colosa/processmaker into BUG-14056-3
This commit is contained in:
@@ -3089,7 +3089,7 @@ class wsBase
|
||||
}
|
||||
|
||||
if (! empty( $unpauseDate )) {
|
||||
if (! preg_match( "/^\d{4}-\d{2}-\d{2}$/", $unpauseDate )) {
|
||||
if (! preg_match( "/^\d{4}-\d{2}-\d{2}| \d{2}:\d{2}:\d{2}$/", $unpauseDate )) {
|
||||
$result = new wsResponse( 100, G::LoadTranslation( "ID_INVALID_DATA" ) . " $unpauseDate" );
|
||||
|
||||
$g->sessionVarRestore();
|
||||
|
||||
@@ -143,9 +143,6 @@ class UsersProperties extends BaseUsersProperties
|
||||
if (! defined( 'PPP_EXPIRATION_IN' )) {
|
||||
define( 'PPP_EXPIRATION_IN', 0 );
|
||||
}
|
||||
if (! defined( 'PPP_CHANGE_PASSWORD_AFTER_NEXT_LOGIN' )) {
|
||||
define( 'PPP_CHANGE_PASSWORD_AFTER_NEXT_LOGIN', 0 );
|
||||
}
|
||||
if (function_exists( 'mb_strlen' )) {
|
||||
$iLength = mb_strlen( $sPassword );
|
||||
} else {
|
||||
@@ -177,9 +174,9 @@ class UsersProperties extends BaseUsersProperties
|
||||
G::LoadClass( 'calendar' );
|
||||
$oCalendar = new calendar();
|
||||
|
||||
if ($oCalendar->pmCalendarUid == '') {
|
||||
$oCalendar->pmCalendarUid = '00000000000000000000000000000001';
|
||||
$oCalendar->getCalendarData();
|
||||
if ($oCalendar->pmCalendarUid == '') {
|
||||
$oCalendar->pmCalendarUid = '00000000000000000000000000000001';
|
||||
$oCalendar->getCalendarData();
|
||||
}
|
||||
|
||||
$fDays = $oCalendar->calculateDuration( date( 'Y-m-d H:i:s' ), $sLastUpdate );
|
||||
@@ -187,10 +184,8 @@ class UsersProperties extends BaseUsersProperties
|
||||
$aErrors[] = 'ID_PPP_EXPIRATION_IN';
|
||||
}
|
||||
}
|
||||
if (PPP_CHANGE_PASSWORD_AFTER_NEXT_LOGIN == 1) {
|
||||
if ($iChangePasswordNextTime == 1) {
|
||||
$aErrors[] = 'ID_PPP_CHANGE_PASSWORD_AFTER_NEXT_LOGIN';
|
||||
}
|
||||
if ($iChangePasswordNextTime == 1) {
|
||||
$aErrors[] = 'ID_PPP_CHANGE_PASSWORD_AFTER_NEXT_LOGIN';
|
||||
}
|
||||
return $aErrors;
|
||||
}
|
||||
|
||||
@@ -140,6 +140,9 @@ switch ($_POST['action']) {
|
||||
if (!isset($form['USR_AUTH_USER_DN'])) {
|
||||
$form['USR_AUTH_USER_DN'] = '';
|
||||
}
|
||||
if (!isset($form['USR_LOGGED_NEXT_TIME'])) {
|
||||
$form['USR_LOGGED_NEXT_TIME'] = 0;
|
||||
}
|
||||
|
||||
if ($form['USR_UID'] == '') {
|
||||
$criteria = new Criteria();
|
||||
@@ -208,6 +211,11 @@ switch ($_POST['action']) {
|
||||
die;
|
||||
}
|
||||
*/
|
||||
require_once 'classes/model/UsersProperties.php';
|
||||
$oUserProperty = new UsersProperties();
|
||||
$aUserProperty = $oUserProperty->loadOrCreateIfNotExists($aData['USR_UID'], array('USR_PASSWORD_HISTORY' => serialize(array(md5($aData['USR_PASSWORD'])))));
|
||||
$aUserProperty['USR_LOGGED_NEXT_TIME'] = $form['USR_LOGGED_NEXT_TIME'];
|
||||
$oUserProperty->update($aUserProperty);
|
||||
} else {
|
||||
|
||||
$aData['USR_UID'] = $form['USR_UID'];
|
||||
@@ -229,7 +237,7 @@ switch ($_POST['action']) {
|
||||
}
|
||||
if ($RBAC->aUserInfo['PROCESSMAKER']['ROLE']['ROL_CODE'] == 'PROCESSMAKER_ADMIN') {
|
||||
$aUserProperty['USR_LAST_UPDATE_DATE'] = date('Y-m-d H:i:s');
|
||||
$aUserProperty['USR_LOGGED_NEXT_TIME'] = 1;
|
||||
$aUserProperty['USR_LOGGED_NEXT_TIME'] = $form['USR_LOGGED_NEXT_TIME'];
|
||||
$oUserProperty->update($aUserProperty);
|
||||
}
|
||||
|
||||
@@ -292,7 +300,7 @@ switch ($_POST['action']) {
|
||||
$aHistory[] = $form['USR_PASSWORD'];
|
||||
}
|
||||
$aUserProperty['USR_LAST_UPDATE_DATE'] = date('Y-m-d H:i:s');
|
||||
$aUserProperty['USR_LOGGED_NEXT_TIME'] = 1;
|
||||
$aUserProperty['USR_LOGGED_NEXT_TIME'] = $form['USR_LOGGED_NEXT_TIME'];
|
||||
$aUserProperty['USR_PASSWORD_HISTORY'] = serialize($aHistory);
|
||||
$oUserProperty->update($aUserProperty);
|
||||
}
|
||||
@@ -499,7 +507,12 @@ switch ($_POST['action']) {
|
||||
$aFields['USER_LOGGED_ROLE'] = $aUserLog['USR_ROLE'];
|
||||
|
||||
$aFields['CASES_MENUSELECTED_NAME'] = $casesMenuSelected;
|
||||
|
||||
|
||||
require_once 'classes/model/UsersProperties.php';
|
||||
$oUserProperty = new UsersProperties();
|
||||
$aFieldsUserProperty = $oUserProperty->load($_POST['USR_UID']);
|
||||
$aFields['USR_LOGGED_NEXT_TIME'] = $aFieldsUserProperty['USR_LOGGED_NEXT_TIME'];
|
||||
|
||||
$result->success = true;
|
||||
$result->user = $aFields;
|
||||
|
||||
|
||||
@@ -620,7 +620,20 @@ Ext.onReady(function () {
|
||||
|
||||
]
|
||||
});
|
||||
|
||||
|
||||
var accountOptions = new Ext.form.FieldSet({
|
||||
title: _('ID_ACCOUNT_OPTIONS'),
|
||||
items: [{
|
||||
xtype: 'checkbox',
|
||||
id: 'USR_LOGGED_NEXT_TIME',
|
||||
name: 'USR_LOGGED_NEXT_TIME',
|
||||
boxLabel: _('ID_USER_MUST_CHANGE_PASSWORD_AT_NEXT_LOGON'),
|
||||
value: 0,
|
||||
inputValue: 1,
|
||||
uncheckedValue: 0
|
||||
}]
|
||||
});
|
||||
|
||||
storeDefaultMainMenuOption = new Ext.data.Store({
|
||||
proxy: new Ext.data.HttpProxy({
|
||||
url: "usersAjax",
|
||||
@@ -727,6 +740,7 @@ Ext.onReady(function () {
|
||||
items : [
|
||||
informationFields,
|
||||
passwordFields,
|
||||
accountOptions,
|
||||
profileFields,
|
||||
preferencesFields
|
||||
],
|
||||
@@ -1277,7 +1291,8 @@ function loadUserData()
|
||||
USR_PHONE : data.user.USR_PHONE,
|
||||
USR_POSITION : data.user.USR_POSITION,
|
||||
USR_DUE_DATE : data.user.USR_DUE_DATE,
|
||||
USR_STATUS : data.user.USR_STATUS
|
||||
USR_STATUS : data.user.USR_STATUS,
|
||||
USR_LOGGED_NEXT_TIME : data.user.USR_LOGGED_NEXT_TIME
|
||||
});
|
||||
|
||||
if (infoMode) {
|
||||
|
||||
Reference in New Issue
Block a user