Rename #*name to #*_name #69

Merged
dergrimm merged 1 commit from fix-name-variable-names into main 2022-02-25 14:34:19 +00:00
3 changed files with 7 additions and 7 deletions
Showing only changes of commit d6bb1b937d - Show all commits

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: