Rename #*name to #*_name
All checks were successful
continuous-integration/drone/push Build is passing
continuous-integration/drone/pr Build is passing

This commit is contained in:
Dominic Grimm 2022-02-25 15:32:11 +01:00
parent 6beaf1817f
commit d6bb1b937d
3 changed files with 7 additions and 7 deletions

View file

@ -26,14 +26,14 @@ module Backend
@[GraphQL::Field] @[GraphQL::Field]
# User's first name # User's first name
def firstname : String def first_name : String
find!.firstname find!.first_name
end end
@[GraphQL::Field] @[GraphQL::Field]
# User's last name # User's last name
def lastname : String def last_name : String
find!.lastname find!.last_name
end end
@[GraphQL::Field] @[GraphQL::Field]

View file

@ -36,12 +36,12 @@ module Backend
column admin : Bool = false column admin : Bool = false
# User's first name # User's first name
def firstname : String def first_name : String
Ldap.user(Ldap.uid(@username.not_nil!)).first["givenName"].first Ldap.user(Ldap.uid(@username.not_nil!)).first["givenName"].first
end end
# User's last name # User's last name
def lastname : String def last_name : String
Ldap.user(Ldap.uid(@username.not_nil!)).first["sn"].first Ldap.user(Ldap.uid(@username.not_nil!)).first["sn"].first
end end

View file

@ -1,4 +1,4 @@
Hey, <%= user.firstname %>! Hey, <%= user.first_name %>!
Du wurdest erfolgreich als Lehrer registriert. Du wurdest erfolgreich als Lehrer registriert.
Initialisiere deinen Account, indem du auf den folgenden Link klickst und deine Daten eingibst: Initialisiere deinen Account, indem du auf den folgenden Link klickst und deine Daten eingibst: