Please whitelist cPanel in your adblocker so that you’re able to see our version release promotions, thanks!

The Community Forums

Interact with an entire community of cPanel & WHM users!

cpanel pw strength outside of cpanel?

Discussion in 'cPanel Developers' started by Mr_Butter, Sep 16, 2009.

  1. Mr_Butter

    Mr_Butter Registered

    Joined:
    Oct 14, 2006
    Messages:
    4
    Likes Received:
    0
    Trophy Points:
    151
    I have a script which allows users to change their email passwords. Is there a way to include the cpanel password strength bar in that page? I played around for a bit to include some of the JS but it was a no-go.

    Right now a lot of users submit the form but the pw doesnt get changed because it isnt strong enough (but the site isnt telling them how strong it is...)

    Any way to get this done?
     
  2. Infopro

    Infopro cPanel Sr. Product Evangelist
    Staff Member

    Joined:
    May 20, 2003
    Messages:
    16,518
    Likes Received:
    425
    Trophy Points:
    583
    Location:
    Pennsylvania
    cPanel Access Level:
    Root Administrator
    Twitter:
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  3. MattDees

    MattDees Well-Known Member

    Joined:
    Apr 29, 2005
    Messages:
    416
    Likes Received:
    1
    Trophy Points:
    243
    Location:
    Houston, TX
    cPanel Access Level:
    Root Administrator
    passwdstrength::get_required_strength( hash )
    API Version: 2
    Description: Get the minimum strength required set by WHM
    Parameters
    app => string
    this is the name of the application that the minimum strength is being checked for.

    Return:
    $VAR1 = {
    'strength' => int indicating lowest strength
    };
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  4. MattDees

    MattDees Well-Known Member

    Joined:
    Apr 29, 2005
    Messages:
    416
    Likes Received:
    1
    Trophy Points:
    243
    Location:
    Houston, TX
    cPanel Access Level:
    Root Administrator
    PasswdStrength::get_required_strength( hash )
    API Version: 2
    Description: Get the minimum strength required set by WHM
    Parameters
    app => string
    this is the name of the application that the minimum strength is being checked for.

    Return:
    Code:
    $VAR1 = {
              'strength' => int indicating lowest strength
            };
    alternatively via the xml-api:

    /xml-api/cpanel?user=cptest&cpanel_xmlapi_module=PasswdStrength&cpanel_xmlapi_func=get_required_strength&app=ftp

    Code:
    <cpanelresult>
      <apiversion>2</apiversion>
      <data>
        <strength>10</strength>
      </data>
      <event>
        <result>1</result>
      </event>
      <func>get_required_strength</func>
      <module>PasswdStrength</module>
    </cpanelresult>
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
    #4 MattDees, Sep 16, 2009
    Last edited: Sep 16, 2009
Loading...

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice