src/main/php/auth/Token.php
public static function create(User $user, string $salt): self
    {
        return new self(md5($salt . serialize([
                $user->name(),
                $user->firstName(),
                $user->lastName(),
                $user->mailAddress(),
                self::createRandomContent()
        ])));
    }
public static function create(User $user, string $salt): self
    {
        return new self(md5($salt . serialize([
                $user->name(),
                $user->firstName(),
                $user->lastName(),
                $user->mailAddress(),
                self::createRandomContent()
        ])));
    }
public static function create ( User $ user , string $ salt ) : self { return new self ( md5 ( $ salt . serialize ( [ $ user -> name ( ) , $ user -> firstName ( ) , $ user -> lastName ( ) , $ user -> mailAddress ( ) , self :: createRandomContent ( ) ] ) ) ) ; }
creates token for given user

@param   \stubbles\webapp\auth\User  $user  user to create token for
@param   string                      $salt  salt to use for token creation
@return  \stubbles\webapp\auth\Token
creates token for given user