|
|
|
@ -1407,7 +1407,6 @@ function _api_format_user($user, $add_password = false) |
|
|
|
$result['lastLogin'] = $last_login; |
|
|
|
$result['lastLogin'] = $last_login; |
|
|
|
|
|
|
|
|
|
|
|
// Getting user avatar. |
|
|
|
// Getting user avatar. |
|
|
|
|
|
|
|
|
|
|
|
$picture_filename = trim($result['picture_uri']); |
|
|
|
$picture_filename = trim($result['picture_uri']); |
|
|
|
$result['avatar'] = api_get_path(WEB_CODE_PATH).'img/unknown.jpg'; |
|
|
|
$result['avatar'] = api_get_path(WEB_CODE_PATH).'img/unknown.jpg'; |
|
|
|
$result['avatar_small'] = api_get_path(WEB_CODE_PATH).'img/unknown_22.jpg'; |
|
|
|
$result['avatar_small'] = api_get_path(WEB_CODE_PATH).'img/unknown_22.jpg'; |
|
|
|
@ -1454,6 +1453,8 @@ function _api_format_user($user, $add_password = false) |
|
|
|
$result['password'] = $user['password']; |
|
|
|
$result['password'] = $user['password']; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$result['profile_url'] = api_get_path(WEB_CODE_PATH).'social/profile.php?u='.$user_id; |
|
|
|
|
|
|
|
|
|
|
|
return $result; |
|
|
|
return $result; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
@ -7201,7 +7202,7 @@ function api_block_account_captcha($username) |
|
|
|
global $_configuration; |
|
|
|
global $_configuration; |
|
|
|
$minutesToBlock = isset($_configuration['captcha_time_to_block']) ? $_configuration['captcha_time_to_block'] : 10; |
|
|
|
$minutesToBlock = isset($_configuration['captcha_time_to_block']) ? $_configuration['captcha_time_to_block'] : 10; |
|
|
|
$time = time() + $minutesToBlock*60; |
|
|
|
$time = time() + $minutesToBlock*60; |
|
|
|
Usermanager::update_extra_field_value($userInfo['user_id'], 'captcha_blocked_until_date', api_get_utc_datetime($time)); |
|
|
|
UserManager::update_extra_field_value($userInfo['user_id'], 'captcha_blocked_until_date', api_get_utc_datetime($time)); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
/** |
|
|
|
@ -7214,7 +7215,7 @@ function api_clean_account_captcha($username) |
|
|
|
return false; |
|
|
|
return false; |
|
|
|
} |
|
|
|
} |
|
|
|
Session::erase('loginFailedCount'); |
|
|
|
Session::erase('loginFailedCount'); |
|
|
|
Usermanager::update_extra_field_value($userInfo['user_id'], 'captcha_blocked_until_date', null); |
|
|
|
UserManager::update_extra_field_value($userInfo['user_id'], 'captcha_blocked_until_date', null); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
/** |
|
|
|
|