Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add GitHub as social handler in 'Personal' plugin #29

Closed
schmittner opened this issue Jul 29, 2020 · 4 comments
Closed

Add GitHub as social handler in 'Personal' plugin #29

schmittner opened this issue Jul 29, 2020 · 4 comments
Assignees
Milestone

Comments

@schmittner
Copy link
Contributor

It would be nice to be able to add a GitHub identity. Adding the following class to personal/personal/personal/class_socialHandlers.inc should do the trick:

class socialHandler_github extends socialHandler
{
  static function getName ()
  {
    return _('GitHub');
  }

  protected $baseurl = 'https://github.com';
}
@bilbo-the-hobbit
Copy link
Member

hello @schmittner,

interesting indeed, what is the format of the github identity, could you give us and exemple ?

Cheers

@schmittner
Copy link
Contributor Author

According to the rules that are displayed when creating a new account:

  • may only contain alphanumeric characters or hyphens
  • cannot have multiple consecutive hyphens
  • cannot begin or end with a hyphen
  • maximum 39 characters

Somebody already made a regex for this: https://github.com/shinnn/github-username-regex

@bilbo-the-hobbit
Copy link
Member

According to the rules that are displayed when creating a new account:

* may only contain alphanumeric characters or hyphens

* cannot have multiple consecutive hyphens

* cannot begin or end with a hyphen

* maximum 39 characters

Somebody already made a regex for this: https://github.com/shinnn/github-username-regex

thanks we will be looking into it

Cheers

@bilbo-the-hobbit
Copy link
Member

hello @schmittner,

has been merged to https://gitlab.fusiondirectory.org/fusiondirectory/fd-plugins/-/issues/6085

pending codestyle review

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

No branches or pull requests

3 participants