conception
continuous-integration/drone/push Build is passing Details

pull/12/head
samuel 1 year ago
parent 7685ff8454
commit df929e7458

@ -69,25 +69,29 @@ class Color {
} }
class AuthController{ class AuthController{
-twig: Environment
+ login (request) : int + displayRegister() : HttpResponse
+ register (request) : int + displayBadFields(viewName : string, fails : array) : HttpResponse
+ confirmRegister(request : array) : HttpResponse
+ displayLogin() : HttpResponse
+ confirmLogin() : HttpResponse
} }
AuthController --> "- modelAuth" AuthModel AuthController --> "- model" AuthModel
class AuthModel{ class AuthModel{
+ validationRegister(username : string, email : string, password : string)
+ validationLogin (username : string, email : string, password : string) + register(username : string, password : string, confirmPassword : string, email : string): array
+ getUserFields(email : string):array
+ login(email : string, password : string)
} }
AuthModel --> "- gateway" AuthGateway AuthModel --> "- gateway" AuthGateway
class AuthGateway{ class AuthGateway{
-con : Connection -con : Connection
+ insert(mail : string, password : string) + mailExist(email : string) : bool
+ isAccountEqual(mail : string, password : string) + insertAccount(username : string, hash : string, email : string)
+ getUserHash(email : string):string
+ getUserFields (email : string): array
} }
@enduml @enduml

@ -21,7 +21,7 @@ class AuthGateway {
} }
public function insertAccount(string $username, string $hash, string $email) { public function insertAccount(string $username, string $hash, string $email):void{
$this->con->exec("INSERT INTO AccountUser VALUES (:username,:hash,:email)", [':username' => [$username, PDO::PARAM_STR],':hash'=> [$hash, PDO::PARAM_STR],':email'=>[$email, PDO::PARAM_STR]]); $this->con->exec("INSERT INTO AccountUser VALUES (:username,:hash,:email)", [':username' => [$username, PDO::PARAM_STR],':hash'=> [$hash, PDO::PARAM_STR],':email'=>[$email, PDO::PARAM_STR]]);
} }

Loading…
Cancel
Save