Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

How to pass username after failed login

ZPS GPM September 28, 2022

Hi all!

We're displaying a custom error message after a user tried to login but the account has been disabled, mostly because of non-use for a certain period of time (removed from "confluence-users").

Therefore we use some JavaScript in the custom HTML settings (and it's ok that this message also appears when regular users try to access forbidden functions inside confluence):


AJS.toInit(function(){
    AJS.$('.access-error').append('<a href=script.php?username=USERNAME>Custom Message with link to script</a>');
});

 

I'd like to pass the username USERNAME to a script linked in that message, so that the user can reactivate the account easily.

 

Is there a possibility for this?

Thx!

1 answer

1 accepted

1 vote
Answer accepted
Brant Schroeder
Community Champion
February 3, 2023

@ZPS GPM I do not know how you would pass the username when the user is not logged in yet.  You would have to capture it from the login screen and store it in your own variable.  This sounds like a bad idea.

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
SERVER
VERSION
7.13
TAGS
AUG Leaders

Atlassian Community Events