returnpage(title=_("Role authorization request"),req=req,body=_("This request for an authorization has already been authorized."),uid=webuser.getUid(req),navmenuid='youraccount',language=args['ln'],secure_page_p=1)
returnpage(title=title,
body=webaccount.perform_back(
_("You have successfully obtained an authorization as %(x_role)s! "
"This authorization will last until %(x_expiration)s and until "
"you close your browser if you are a guest user.")%
body="<p>"+_("You have confirmed the validity of your email"
" address!")+"</p>"
ifCFG_ACCESS_CONTROL_LEVEL_ACCOUNTS==1:
body+="<p>"+_("Please, wait for the administrator to "
"enable your account.")+"</p>"
else:
uid=webuser.update_Uid(req,email)
body+="<p>"+_("You can now go to %(x_url_open)syour account page%(x_url_close)s.")%{'x_url_open':'<a href="/youraccount/display?ln=%s">'%args['ln'],'x_url_close':'</a>'}+"</p>"
body="<p>"+_("You have already confirmed the validity of your email address!")+"</p>"
ifCFG_ACCESS_CONTROL_LEVEL_ACCOUNTS==1:
body+="<p>"+_("Please, wait for the administrator to "
"enable your account.")+"</p>"
else:
body+="<p>"+_("You can now go to %(x_url_open)syour account page%(x_url_close)s.")%{'x_url_open':'<a href="/youraccount/display?ln=%s">'%args['ln'],'x_url_close':'</a>'}+"</p>"
text=_("This request for an authorization is not valid or"
" is expired."),navmenuid='youraccount')
defresetpassword(self,req,form):
args=wash_urlargd(form,{
'k':(str,''),
'reset':(int,0),
'password':(str,''),
'password2':(str,'')
})
_=gettext_set_language(args['ln'])
title=_('Reset password')
reset_key=args['k']
try:
email=mail_cookie_check_pw_reset(reset_key)
exceptInvenioWebAccessMailCookieDeletedError:
returnpage(title=title,req=req,body=_("This request for resetting a password has already been used."),uid=webuser.getUid(req),navmenuid='youraccount',language=args['ln'],secure_page_p=1)
mess+='<p>'+_("Unable to switch to external login method %s, because your email address is unknown to the external login system.")%cgi.escape(args['login_method'])
mess+='<p>'+_("The external login method %s does not support email address based logins. Please contact the site administrators.")%cgi.escape(args['login_method'])
mess=_("Desired nickname %s already exists in the database.")%cgi.escape(args['p_nickname'])
mess+=" "+_("Please try again.")
act="/youraccount/register?ln=%s"%args['ln']
title=_("Registration failure")
elifruid==5:
mess=_("Users cannot register themselves, only admin can register them.")
act="/youraccount/register?ln=%s"%args['ln']
title=_("Registration failure")
elifruid==6:
mess=_("The site is having troubles in sending you an email for confirming your email address.")+_("The error has been logged and will be taken in consideration as soon as possible.")