Committer: nnikulochkina
LJSUP-12506: Notice user about installed applications after changing passwordU trunk/htdocs/changepassword.bml U trunk/htdocs/changepassword.bml.text
Modified: trunk/htdocs/changepassword.bml =================================================================== --- trunk/htdocs/changepassword.bml 2012-06-07 10:44:09 UTC (rev 22191) +++ trunk/htdocs/changepassword.bml 2012-06-07 11:17:56 UTC (rev 22192) @@ -4,6 +4,7 @@ <?_code use strict; + use LJ::UserApps; my $body; @@ -212,6 +213,15 @@ # if they were logged in, tell them to relogin $body .= "<?p " . BML::ml('.relogin', { 'aopts' => "href='/login.bml'" }) . " p?>" if $remote; + # Notice about installed applications + my $count; + if ($count = LJ::UserApps->user_apps_count($u)){ + $body .= "<?p " + . BML::ml('.installed_apps', {'count' => $count}) + . ($remote ? BML::ml('.uninstall_apps') : '') + . " p?>"; + } + LJ::run_hooks("post_changepassword", { "u" => $u, "newpassword" => $POST{'newpass1'}, Modified: trunk/htdocs/changepassword.bml.text =================================================================== --- trunk/htdocs/changepassword.bml.text 2012-06-07 10:44:09 UTC (rev 22191) +++ trunk/htdocs/changepassword.bml.text 2012-06-07 11:17:56 UTC (rev 22192) @@ -56,6 +56,8 @@ .forcechange=<?p Your current password is too easy for an automated program to guess, so your account has been frozen. Before you do anything else, you need to change your password. p?> +.installed_apps=You have [[count]] installed application(s) that have access to your account. + .newpassword=New Password: .newpasswordagain=New Password (again): @@ -64,6 +66,8 @@ .proceed.instructions=Press the button below and your password will be changed. You will receive an email as well, noting the password change. +.uninstall_apps= Would you like to <a href=/manage/settings/?cat=userapps>uninstall applications</a>? + .relogin=In addition, you have been logged out from all your existing sessions. You should <a [[aopts]]>log in again</a> before continuing. .success.text=Your password has been changed and email has been sent to you with a reminder message.