Use ldap email
This commit is contained in:
parent
910536c6d3
commit
7931f50611
2 changed files with 2 additions and 2 deletions
|
@ -47,7 +47,7 @@ class BDSOthersSearch(autocomplete.ModelSearch):
|
|||
class BDSLDAPSearch(autocomplete.LDAPSearch):
|
||||
def result_link(self, clipper):
|
||||
url = reverse("bds:user.create.fromclipper", args=(clipper.clipper,))
|
||||
get = {"fullname": clipper.fullname}
|
||||
get = {"fullname": clipper.fullname, "mail": clipper.mail}
|
||||
|
||||
return "{}?{}".format(url, urlencode(get))
|
||||
|
||||
|
|
|
@ -73,7 +73,7 @@ class UserCreateView(StaffRequiredMixin, MultipleFormView):
|
|||
def get_user_initial(self):
|
||||
if "clipper" in self.kwargs:
|
||||
clipper = self.kwargs["clipper"]
|
||||
email = "{}@clipper.ens.fr".format(clipper)
|
||||
email = self.request.GET.get("mail", "{}@clipper.ens.fr".format(clipper))
|
||||
fullname = self.request.GET.get("fullname", None)
|
||||
|
||||
if fullname:
|
||||
|
|
Loading…
Reference in a new issue