Merge pull request 'Rename #*name to #*_name' (#69) from fix-name-variable-names into main
All checks were successful
continuous-integration/drone/push Build is passing

Reviewed-on: mentorenwahl/mentorenwahl#69
This commit is contained in:
Dominic Grimm 2022-02-25 14:34:16 +00:00
commit 477d49bf3f
3 changed files with 7 additions and 7 deletions

View file

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

View file

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

View file

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